diff --git a/src/app/page.tsx b/src/app/page.tsx index b90b1d2..cdcf173 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,7 @@ 'use client'; import { useEffect, useState } from 'react'; +import { useRouter } from 'next/navigation'; import { createClient } from '@/lib/supabase/client'; import BottleGrid from "@/components/BottleGrid"; import AuthForm from "@/components/AuthForm"; @@ -18,6 +19,7 @@ import ScanAndTasteFlow from '@/components/ScanAndTasteFlow'; export default function Home() { const supabase = createClient(); + const router = useRouter(); const [bottles, setBottles] = useState([]); const [isLoading, setIsLoading] = useState(true); const [user, setUser] = useState(null); @@ -283,7 +285,7 @@ export default function Home() { onHome={() => window.scrollTo({ top: 0, behavior: 'smooth' })} onShelf={() => document.getElementById('collection')?.scrollIntoView({ behavior: 'smooth' })} onSearch={() => document.getElementById('search-filter')?.scrollIntoView({ behavior: 'smooth' })} - onProfile={() => window.scrollTo({ top: 0, behavior: 'smooth' })} + onProfile={() => router.push('/settings')} />