Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit df3f675

Browse files
committed
feat: add calendar tab
1 parent a595d9f commit df3f675

File tree

5 files changed

+57
-5
lines changed

5 files changed

+57
-5
lines changed

src/components/Routes/Routes.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Empty from "../Empty";
1111
import { SmileyXEyes } from "phosphor-react";
1212
import { lazy, ReactNode, Suspense } from "react";
1313
import { Flex, Spinner } from "@chakra-ui/react";
14+
import { Calendar } from "../../routes/Main/Calendar";
1415

1516
const Main = lazy(() => import("../../routes/Main"));
1617
const Landing = lazy(() => import("../../routes/Landing"));
@@ -57,14 +58,15 @@ export default () => (
5758
}
5859
>
5960
<Route index element={<Home />} />
61+
<Route path={"barcodes"} element={<Barcodes />} />
62+
<Route path={"announcements"} element={<Announcements />} />
63+
<Route path={"calendar"} element={<Calendar />} />
6064
<Route path={"settings/*"} element={<Settings />}>
6165
<Route path={"general"} element={<General />} />
6266
<Route path={"developers"} element={<Developers />} />
6367
<Route path={"about"} element={<About />} />
6468
<Route index element={<Navigate to="general" replace={true} />} />
6569
</Route>
66-
<Route path={"barcodes"} element={<Barcodes />} />
67-
<Route path={"announcements"} element={<Announcements />} />
6870
<Route path="*" element={<PageNotFound />} />
6971
</Route>
7072
<Route path="*" element={<PageNotFound />} />

src/components/Sidebar/Sidebar.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Link } from "react-router-dom";
22
import SidebarButton from "./SidebarButton";
3-
import { Barcode, House, Megaphone } from "phosphor-react";
3+
import { Barcode, CalendarBlank, House, Megaphone } from "phosphor-react";
44
import { Flex, useColorModeValue } from "@chakra-ui/react";
55

66
export default ({
@@ -51,5 +51,14 @@ export default ({
5151
mirrored
5252
/>
5353
</Link>
54+
<Link to={"/app/calendar"}>
55+
<SidebarButton
56+
sidebar={sidebar}
57+
name={"Calendar"}
58+
active={pathname === "/app/calendar"}
59+
icon={CalendarBlank}
60+
mirrored
61+
/>
62+
</Link>
5463
</Flex>
5564
);

src/components/Sidebar/SidebarButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default ({
3838
<MotionFlex
3939
justify={"center"}
4040
bg={active ? secondary + "40" : undefined}
41-
animate={{ width: active ? (sidebar ? "56px" : "64px") : "0px" }}
41+
animate={{ width: active ? (sidebar ? "48px" : "56px") : "0px" }}
4242
align={"center"}
4343
borderRadius={"16px"}
4444
h={"32px"}
@@ -51,7 +51,7 @@ export default ({
5151
/>
5252
</Box>
5353
</MotionFlex>
54-
<Text as={active ? "b" : "label"} fontSize={"sm"} mt="4px">
54+
<Text as={active ? "b" : "label"} fontSize={"xs"} mt="4px">
5555
{name}
5656
</Text>
5757
</Flex>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import {
2+
Card,
3+
CardHeader,
4+
Heading,
5+
useToken,
6+
Badge,
7+
CardBody,
8+
Icon,
9+
Flex,
10+
} from "@chakra-ui/react";
11+
12+
import { Calendar as CalendarIcon } from "phosphor-react";
13+
14+
export const Calendar = () => {
15+
console.log("calendar");
16+
return (
17+
<Flex w={"full"} h="full" direction={"column"} align="center">
18+
<Card bg="transparent" shadow="xl">
19+
<CardHeader>
20+
<Heading size="md" display={"flex"} alignItems="center" gap={2}>
21+
<Icon
22+
rounded="full"
23+
as={CalendarIcon}
24+
bg={useToken("colors", "primary.400") + "22"}
25+
boxSize={10}
26+
p={2}
27+
color="primary.400"
28+
/>
29+
Calendar<Badge>Coming soon</Badge>
30+
</Heading>
31+
</CardHeader>
32+
<CardBody>
33+
Get a bird&apos;s eye view of your timetable, and see what&apos;s
34+
coming. View your sport from Clipboard, see when you assignments are
35+
due from Canvas and more.
36+
</CardBody>
37+
</Card>
38+
</Flex>
39+
);
40+
};

src/routes/Main/Calendar/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { Calendar } from "./Calendar";

0 commit comments

Comments
 (0)