Skip to content

Commit

Permalink
fix: update default screen
Browse files Browse the repository at this point in the history
  • Loading branch information
TopETH committed Apr 12, 2024
1 parent 4e8e8b6 commit 85161a7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/masterbots.ai/components/layout/user-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'

import Image from 'next/image'
import { useRouter } from 'next/navigation'
import { Button } from '@/components/ui/button'
import {
DropdownMenu,
Expand All @@ -16,8 +17,16 @@ import { useGlobalStore } from '@/hooks/use-global-store'
export function UserMenu() {
const supabase = useSupabaseClient()
const { user } = useGlobalStore()
const router = useRouter()

const signout = () => supabase.auth.signOut()
const signout = async () => {
const { error } = await supabase.auth.signOut()
if (error) {
console.error('ERROR:', error)
}
router.push('/')
router.refresh()
}

return (
<div className="flex items-center justify-between">
Expand Down

0 comments on commit 85161a7

Please sign in to comment.