diff --git a/src/components/Calendar/Calendar.styl b/src/components/Calendar/Calendar.styl index 8e251eb..090c2fe 100644 --- a/src/components/Calendar/Calendar.styl +++ b/src/components/Calendar/Calendar.styl @@ -5,10 +5,12 @@ justify-content space-between .main-layout + display flex + height calc(100vh - 90px) + +.main-layout.calendar-layout background-color #fff flex-direction row - height calc(100vh - 90px) - display flex .calendar flex-grow 1 diff --git a/src/components/Calendar/Calendar.tsx b/src/components/Calendar/Calendar.tsx index 895be14..ad4bf9a 100644 --- a/src/components/Calendar/Calendar.tsx +++ b/src/components/Calendar/Calendar.tsx @@ -574,7 +574,7 @@ export default function CalendarApp({ const { t, lang } = useI18n(); return ( -
+
(null); const dispatch = useAppDispatch(); const error = useAppSelector((state) => state.calendars.error); const selectedCalendars = useAppSelector((state) => state.calendars.list); const tempcalendars = useAppSelector((state) => state.calendars.templist); + const view = useAppSelector((state) => state.settings.view); const [currentDate, setCurrentDate] = useState(new Date()); const [currentView, setCurrentView] = useState("timeGridWeek"); @@ -59,11 +63,15 @@ export default function CalendarLayout() { return (
- + {view === "calendar" && ( + + )} + {view === "settings" && } + {view === "search" && }
); diff --git a/src/features/Search/SearchResultsPage.tsx b/src/features/Search/SearchResultsPage.tsx new file mode 100644 index 0000000..8a161d3 --- /dev/null +++ b/src/features/Search/SearchResultsPage.tsx @@ -0,0 +1,9 @@ +import React from "react"; + +export default function SearchResultsPage() { + return ( +
+

Search Results

+
+ ); +} diff --git a/src/features/Settings/SettingsPage.tsx b/src/features/Settings/SettingsPage.tsx new file mode 100644 index 0000000..a4fac2e --- /dev/null +++ b/src/features/Settings/SettingsPage.tsx @@ -0,0 +1,9 @@ +import React from "react"; + +export default function SettingsPage() { + return ( +
+

Settings Page

+
+ ); +} diff --git a/src/features/Settings/SettingsSlice.ts b/src/features/Settings/SettingsSlice.ts index 1f7d50b..9c36e46 100644 --- a/src/features/Settings/SettingsSlice.ts +++ b/src/features/Settings/SettingsSlice.ts @@ -2,6 +2,7 @@ import { createSlice, PayloadAction } from "@reduxjs/toolkit"; export interface SettingsState { language: string; + view: "calendar" | "settings" | "search"; } const savedLang = localStorage.getItem("lang"); @@ -9,6 +10,7 @@ const defaultLang = savedLang ?? (window as any).LANG ?? "en"; const initialState: SettingsState = { language: defaultLang, + view: "calendar", }; export const settingsSlice = createSlice({ @@ -19,8 +21,14 @@ export const settingsSlice = createSlice({ state.language = action.payload; localStorage.setItem("lang", action.payload); }, + setView: ( + state, + action: PayloadAction<"calendar" | "settings" | "search"> + ) => { + state.view = action.payload; + }, }, }); -export const { setLanguage } = settingsSlice.actions; +export const { setLanguage, setView } = settingsSlice.actions; export default settingsSlice.reducer;