-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Capture documentation search analytics & improve legacy docs handling (…
- Loading branch information
Showing
5 changed files
with
515 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client' | ||
|
||
import { AlertCircle } from 'lucide-react' | ||
import { usePathname } from 'next/navigation' | ||
|
||
export default function LegacyBanner() { | ||
const pathname = usePathname() | ||
|
||
const isLegacy = pathname?.startsWith('/docs/legacy') | ||
|
||
if (!isLegacy) return null | ||
|
||
return ( | ||
<> | ||
<div className="sticky top-[5rem] inset-x-0 z-10"> | ||
<div className="flex items-center gap-2 max-w-6xl mx-auto w-fit px-4 py-3 rounded-2xl bg-gradient-to-b from-zinc-800 to-zinc-900 text-zinc-400 ring-1 ring-inset ring-zinc-700"> | ||
<AlertCircle className="h-4 w-4 text-brand-400/80" /> | ||
<span> | ||
You are reading a{' '} | ||
<span className="text-brand-400/90">legacy (pre v.1.0)</span>{' '} | ||
document. | ||
</span> | ||
</div> | ||
</div> | ||
<div className="h-16" /> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.