diff --git a/apps/dashboard/components/events/events-calendar.tsx b/apps/dashboard/components/events/events-calendar.tsx index 8d83589e..f4553d94 100644 --- a/apps/dashboard/components/events/events-calendar.tsx +++ b/apps/dashboard/components/events/events-calendar.tsx @@ -46,13 +46,14 @@ function EventsCalendar(props: EventsCalendarProps) { // Preset scroll to current time useEffect(() => { const d = new Date(); + console.log(d.getHours() * 100); scrollRefs.current.forEach((el) => { if (el) { el.scrollTop = d.getHours() * 100; } }); - }, []); // Empty dependency array to ensure this only runs on mount + }, [cards]); // Empty dependency array to ensure this only runs on mount useEffect(() => { const gridContainer = document.querySelectorAll('.grid-container'); diff --git a/apps/dashboard/layouts/themeless-layout.tsx b/apps/dashboard/layouts/themeless-layout.tsx index 5c664eb1..a20d51ea 100644 --- a/apps/dashboard/layouts/themeless-layout.tsx +++ b/apps/dashboard/layouts/themeless-layout.tsx @@ -20,6 +20,7 @@ import { import { FaRegUserCircle } from 'react-icons/fa'; import { useRouter } from 'next/router'; import { SponsorServiceAPI } from '../common/api'; +import { IoDocumentTextOutline } from 'react-icons/io5'; export type ThemelessLayoutProps = React.PropsWithChildren; @@ -47,6 +48,11 @@ function ThemelessLayout({ children }: ThemelessLayoutProps) { { name: 'Events', url: '/events', image: MdOutlineCalendarViewMonth }, { name: 'Leaderboard', url: '/leaderboard', image: MdStarOutline }, { name: 'Profile', url: '/hacker-profile', image: FaRegUserCircle }, + { + name: 'Hacker Packet', + url: '/hacker-packet', + image: IoDocumentTextOutline, + }, ]; if (user.role === HibiscusRole.VOLUNTEER) return [ diff --git a/libs/sso-client/src/lib/sso-client.ts b/libs/sso-client/src/lib/sso-client.ts index ad976c75..49701c97 100644 --- a/libs/sso-client/src/lib/sso-client.ts +++ b/libs/sso-client/src/lib/sso-client.ts @@ -36,6 +36,10 @@ export const middlewareHandler = return res; } + if (request.nextUrl.pathname.startsWith('/hacker-packet')) { + return NextResponse.redirect(getEnv().Hibiscus.RSVPForm.HackerPacketURL); + } + // Special routes // TODO: rewrite this to make it more generic if (request.nextUrl.pathname.startsWith('/api/tally/')) {