Skip to content

Commit 8753537

Browse files
committed
not much
1 parent 1a6ad79 commit 8753537

3 files changed

Lines changed: 57 additions & 67 deletions

File tree

devconnect-app/src/app/dashboard-sections.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22
import Event from 'lib/components/event-schedule-new/event/event';
3-
import { useFavorites } from './store.hooks';
3+
import { useEvents, useFavorites } from './store.hooks';
44
import NoEventsImage from 'lib/components/event-schedule-new/images/404.png';
55
import moment from 'moment';
66
import Image from 'next/image';
@@ -33,10 +33,12 @@ export function WelcomeSection() {
3333
);
3434
}
3535

36-
export function TodaysSchedule({ atprotoEvents }: { atprotoEvents: any[] }) {
36+
export function TodaysSchedule() {
37+
const events = useEvents();
3738
const [favorites] = useFavorites();
3839
const [selectedEvent, setSelectedEvent] = useState<any>(null);
39-
const events = atprotoEvents.filter((event) =>
40+
// TODO: implement more advanced filtering here, e.g. highlighted events like ethereum day , etc.
41+
const filteredEvents = events.filter((event) =>
4042
favorites.includes(event.id.toString())
4143
);
4244

@@ -68,7 +70,7 @@ export function TodaysSchedule({ atprotoEvents }: { atprotoEvents: any[] }) {
6870

6971
{hasEventsToShow && (
7072
<div className="flex flex-col items-stretch gap-2 w-full">
71-
{events.map((event) => (
73+
{filteredEvents.map((event) => (
7274
<Event
7375
compact
7476
key={event.id}

devconnect-app/src/app/page-content.tsx

Lines changed: 0 additions & 58 deletions
This file was deleted.

devconnect-app/src/app/page.tsx

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,54 @@
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';
37

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+
];
631

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+
);
854
}

0 commit comments

Comments
 (0)