1
- 'use client ';
1
+ import { Link , useLocation } from '@remix-run/react ';
2
2
3
- import { DocsRoutes } from '@/routes' ;
4
- import { buttonVariants } from '@/ui/button' ;
5
- import { CardAnimatedBorder } from '@/ui/cards-spotlight' ;
6
- import {
7
- Collapsible ,
8
- CollapsibleContent ,
9
- CollapsibleTrigger ,
10
- } from '@/ui/collapsible' ;
11
- import { cn } from '@/utils' ;
12
- import { ArrowUpRight , NavArrowDown } from 'iconoir-react' ;
13
-
14
- import Link from 'next/link' ;
15
- import { usePathname } from 'next/navigation' ;
3
+ import { DocsRoutes } from '@/docs.routes' ;
4
+ import { cn } from '@/utils/index' ;
5
+ import { ArrowUpRight } from 'iconoir-react' ;
16
6
17
7
const SidebarContent = ( ) => {
18
- const pathname = usePathname ( ) ;
8
+ const location = useLocation ( ) ;
19
9
return (
20
10
< nav
21
11
className = { cn (
22
- '] fixed z-50 h-[calc(100vh-4rem)] overflow-y-auto overflow-x-hidden pb-10' ,
23
- 'bg-white dark:bg-neutral-900' ,
12
+ 'fixed z-50 h-[calc(100vh-4rem)] overflow-y-auto overflow-x-hidden pb-10' ,
13
+ 'bg-neutral-50 dark:bg-neutral-900' ,
24
14
'flex flex-col' ,
25
15
) }
26
16
>
@@ -34,13 +24,13 @@ const SidebarContent = () => {
34
24
{ route . routes . map ( ( r ) => (
35
25
< Link
36
26
key = { r . path }
37
- href = { r . path }
27
+ to = { r . path }
38
28
className = { cn (
39
29
'px-4 py-2 text-sm' ,
40
30
'border-l border-neutral-200 dark:border-neutral-800' ,
41
31
'text-neutral-600 hover:text-black dark:text-neutral-400 dark:hover:text-white' ,
42
32
'transition-colors' ,
43
- pathname === r . path
33
+ location . pathname === r . path
44
34
? 'border-black font-medium text-black dark:border-white dark:text-white'
45
35
: 'bg-transparent' ,
46
36
) }
@@ -52,8 +42,8 @@ const SidebarContent = () => {
52
42
</ div >
53
43
) ) }
54
44
</ div >
55
- < div className = "w-full border-b border-neutral-200 py-2 text-sm dark:border-neutral-800" >
56
- < p className = "font-medium" > Found an issue ?</ p >
45
+ < div className = "w-full border-b-2 border-dashed border-neutral-200 py-2 text-sm dark:border-neutral-800" >
46
+ < p className = "font-medium" > Found a bug ?</ p >
57
47
< a
58
48
href = "https://github.com/pheralb/toast/issues/new"
59
49
target = "_blank"
0 commit comments