|
1 | | -import HomePageContent from './page-content'; |
2 | | -import { getAtprotoEvents } from '@/utils/atproto-events'; |
| 1 | +'use client'; |
| 2 | +import { useEffect } from 'react'; |
| 3 | +import { useRouter } from 'next/navigation'; |
| 4 | +import PageLayout from '@/components/PageLayout'; |
| 5 | +import { WelcomeSection, TodaysSchedule } from './dashboard-sections'; |
| 6 | +import { HomeIcon, CalendarIcon, TicketIcon } from 'lucide-react'; |
3 | 7 |
|
4 | | -export default async function HomePage() { |
5 | | - const atprotoEvents = await getAtprotoEvents(); |
| 8 | +export const homeTabs = () => [ |
| 9 | + { |
| 10 | + label: 'Home', |
| 11 | + labelIcon: HomeIcon, |
| 12 | + href: '/', |
| 13 | + component: () => null, |
| 14 | + isActive: (pathname: string) => pathname === '/', |
| 15 | + }, |
| 16 | + { |
| 17 | + label: 'Schedule', |
| 18 | + labelIcon: CalendarIcon, |
| 19 | + href: '/schedule', |
| 20 | + component: () => null, |
| 21 | + isActive: (pathname: string) => pathname === '/schedule', |
| 22 | + }, |
| 23 | + { |
| 24 | + label: 'Tickets', |
| 25 | + labelIcon: TicketIcon, |
| 26 | + href: '/tickets', |
| 27 | + component: () => null, |
| 28 | + isActive: (pathname: string) => pathname === '/tickets', |
| 29 | + }, |
| 30 | +]; |
6 | 31 |
|
7 | | - return <HomePageContent atprotoEvents={atprotoEvents} />; |
| 32 | +export default function HomePageContent() { |
| 33 | + // const events = useEvents(); |
| 34 | + // const router = useRouter(); |
| 35 | + // const { address } = useUnifiedConnection(); |
| 36 | + |
| 37 | + // useEffect(() => { |
| 38 | + // const isSkipped = localStorage.getItem('loginIsSkipped'); |
| 39 | + |
| 40 | + // if (!isSkipped && address) { |
| 41 | + // console.log('🔄 [HOME] Redirecting to onboarding'); |
| 42 | + // router.push('/onboarding'); |
| 43 | + // } |
| 44 | + // }, [router, address]); |
| 45 | + |
| 46 | + return ( |
| 47 | + <PageLayout title="Ethereum World's Fair" tabs={homeTabs()}> |
| 48 | + <div className="bg-[rgba(246,250,254,1)] p-4 grow"> |
| 49 | + <WelcomeSection /> |
| 50 | + <TodaysSchedule /> |
| 51 | + </div> |
| 52 | + </PageLayout> |
| 53 | + ); |
8 | 54 | } |
0 commit comments