1
1
'use client'
2
2
3
- import { useTransition } from 'react'
4
- import { useRouter } from 'next/navigation'
3
+ import { Button } from '@/components/ui/button'
5
4
import {
6
5
Sheet ,
7
6
SheetContent ,
8
7
SheetHeader ,
9
8
SheetTitle ,
10
9
SheetTrigger
11
10
} from '@/components/ui/sheet'
12
- import { Button } from '@/components/ui/button'
13
- import { ChevronLeft , Menu } from 'lucide-react'
14
- import { cn } from '@/lib/utils'
15
- import { History as HistoryIcon } from 'lucide-react'
16
- import { Suspense } from 'react'
11
+ import { History as HistoryIcon , Menu } from 'lucide-react'
12
+ import { useRouter } from 'next/navigation'
13
+ import { Suspense , useTransition } from 'react'
17
14
import { HistorySkeleton } from './history-skeleton'
18
15
19
16
type HistoryProps = {
20
- location : 'sidebar' | 'header'
21
17
children ?: React . ReactNode
22
18
}
23
19
24
- export function History ( { location , children } : HistoryProps ) {
20
+ export function History ( { children } : HistoryProps ) {
25
21
const router = useRouter ( )
26
22
const [ isPending , startTransition ] = useTransition ( )
27
23
@@ -36,14 +32,8 @@ export function History({ location, children }: HistoryProps) {
36
32
return (
37
33
< Sheet onOpenChange = { onOpenChange } >
38
34
< SheetTrigger asChild >
39
- < Button
40
- variant = "ghost"
41
- size = "icon"
42
- className = { cn ( {
43
- 'rounded-full text-foreground/30' : location === 'sidebar'
44
- } ) }
45
- >
46
- { location === 'header' ? < Menu /> : < ChevronLeft size = { 16 } /> }
35
+ < Button variant = "ghost" size = "icon" >
36
+ < Menu />
47
37
</ Button >
48
38
</ SheetTrigger >
49
39
< SheetContent className = "w-64 rounded-tl-xl rounded-bl-xl" >
0 commit comments