feat: Link profile button to /settings page
- Added router.push('/settings') to onProfile handler
- User icon in bottom nav now navigates to settings
This commit is contained in:
@@ -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<any[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const [user, setUser] = useState<any>(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')}
|
||||
/>
|
||||
|
||||
<ScanAndTasteFlow
|
||||
|
||||
Reference in New Issue
Block a user