Skip to content

Commit

Permalink
chore: add auth wall to calendar page
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemSBulgakov committed Feb 17, 2025
1 parent 66529e4 commit db6a7ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/calendar/CalendarPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { useMe } from "@/api/accounts/user.ts";
import { $events, eventsTypes } from "@/api/events";
import { Calendar } from "@/components/calendar/Calendar.tsx";
import { URLType } from "@/components/calendar/CalendarViewer.tsx";
import { AuthWall } from "@/components/common/AuthWall.tsx";
import {
getICSLink,
getMyMoodleLink,
Expand All @@ -16,6 +18,12 @@ export function CalendarPage() {

const initialWidth = useRef(window.innerWidth);

const { me } = useMe();

if (!me) {
return <AuthWall />;
}

return (
<div className="grow overflow-hidden">
<Calendar
Expand Down

0 comments on commit db6a7ce

Please sign in to comment.