@@ -3,9 +3,11 @@ import { SideNavItem, SideNavItems } from "@/components/nav/constants";
3
3
import { cn } from "@/lib/utils" ;
4
4
import { motion , useCycle , Variants } from "framer-motion" ;
5
5
import { usePathname } from "next/navigation" ;
6
- import { ReactNode , useRef } from "react" ;
6
+ import { ComponentProps , ReactNode , useRef } from "react" ;
7
7
import { useDimensions } from "@/hooks/use-dimensions" ;
8
8
import Link from "next/link" ;
9
+ import { Button } from "@/components/ui/button" ;
10
+ import { logOut } from "@/app/(auth)/action" ;
9
11
10
12
const sidebarVariants : Variants = {
11
13
open : ( height : number = 1000 ) => ( {
@@ -100,6 +102,23 @@ export function HeaderMobile() {
100
102
</ div >
101
103
) ;
102
104
} ) }
105
+ < MenuItem className = "flex w-full text-2xl my-3 cursor-pointer" >
106
+ < Link
107
+ href = { "https://github.com/listlessbird/sparkles/" }
108
+ target = "_blank"
109
+ >
110
+ github
111
+ </ Link >
112
+ </ MenuItem >
113
+
114
+ < MenuItem
115
+ className = "flex w-full text-2xl my-3 cursor-pointer"
116
+ onClick = { async ( ) => {
117
+ await logOut ( ) ;
118
+ } }
119
+ >
120
+ logout
121
+ </ MenuItem >
103
122
</ motion . ul >
104
123
< MenuToggle toggle = { toggleOpen } />
105
124
</ motion . nav >
@@ -109,12 +128,13 @@ export function HeaderMobile() {
109
128
const MenuItem = ( {
110
129
className,
111
130
children,
131
+ ...props
112
132
} : {
113
133
className ?: string ;
114
134
children ?: ReactNode ;
115
- } ) => {
135
+ } & ComponentProps < typeof motion . li > ) => {
116
136
return (
117
- < motion . li variants = { MenuItemVariants } className = { className } >
137
+ < motion . li variants = { MenuItemVariants } className = { className } { ... props } >
118
138
{ children }
119
139
</ motion . li >
120
140
) ;
0 commit comments