+
diff --git a/src/components/ZoomButtons.tsx b/src/components/ZoomButtons.tsx
new file mode 100644
index 0000000..75fc137
--- /dev/null
+++ b/src/components/ZoomButtons.tsx
@@ -0,0 +1,39 @@
+import { Button, Tooltip } from '@nextui-org/react';
+import { useTranslation } from 'react-i18next';
+
+import {
+ MAX_HOUR_HEIGHT,
+ MIN_HOUR_HEIGHT,
+ useCalendarHourHeight,
+} from '../helpers/calendar';
+
+export const ZoomButtons = () => {
+ const { t } = useTranslation();
+
+ const { height, setHeight } = useCalendarHourHeight();
+
+ return (
+
+
+
+
+
+
+
+
+ );
+};
diff --git a/src/helpers/calendar.ts b/src/helpers/calendar.ts
index 1eb967e..3e0cb64 100644
--- a/src/helpers/calendar.ts
+++ b/src/helpers/calendar.ts
@@ -221,8 +221,8 @@ export const useOtherWeekCourseTimes = ({
return times;
};
-const MIN_HEIGHT = 3;
-const MAX_HEIGHT = 10;
+export const MIN_HOUR_HEIGHT = 3;
+export const MAX_HOUR_HEIGHT = 10;
export const useCalendarHourHeight = create<{
height: number;
setHeight: (getNewHeight: (height: number) => number) => void;
@@ -231,6 +231,8 @@ export const useCalendarHourHeight = create<{
setHeight: (getNewHeight) =>
set((state) => {
const height = getNewHeight(state.height);
- return { height: Math.min(Math.max(height, MIN_HEIGHT), MAX_HEIGHT) };
+ return {
+ height: Math.min(Math.max(height, MIN_HOUR_HEIGHT), MAX_HOUR_HEIGHT),
+ };
}),
}));
diff --git a/src/locales/en-au.json b/src/locales/en-au.json
index f3d72b8..134a0f3 100644
--- a/src/locales/en-au.json
+++ b/src/locales/en-au.json
@@ -62,6 +62,10 @@
"get-started": "Get Started!"
}
},
+ "zoom": {
+ "zoom-in": "Zoom In",
+ "zoom-out": "Zoom Out"
+ },
"toast": {
"drop-to-change-term": "You need to drop all courses to change the term",
"too-many-courses": "8 courses for a term is crazy! 💀"
diff --git a/src/locales/zh-cn.json b/src/locales/zh-cn.json
index a4d2aa5..0524e0d 100644
--- a/src/locales/zh-cn.json
+++ b/src/locales/zh-cn.json
@@ -62,6 +62,10 @@
"get-started": "开始使用"
}
},
+ "zoom": {
+ "zoom-in": "放大",
+ "zoom-out": "缩小"
+ },
"toast": {
"drop-to-change-term": "请删除所有课程以更改学期",
"too-many-courses": "课程过多"
diff --git a/src/main.tsx b/src/main.tsx
index 08aa169..ed89f1d 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -36,7 +36,7 @@ if (import.meta.env.DEV) {
ReactDOM.createRoot(document.getElementById('root')!).render(
-
+