Skip to content

Commit

Permalink
oops sorry, started working on the wrong branch
Browse files Browse the repository at this point in the history
  • Loading branch information
usserwoutV2 committed May 9, 2024
1 parent e2f9b59 commit a47cdd6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
1 change: 0 additions & 1 deletion frontend/src/@types/appTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
export enum Themes {
LIGHT = "light",
DARK = "dark",
DODONA = "dodona"
}

export enum Language {
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/components/layout/nav/AuthNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ const AuthNav = () => {
{
key: Themes.DARK,
label: t("nav.dark"),
},
{
key: Themes.DODONA,
label: "Dodona",

},
}
]
},
{
Expand All @@ -59,7 +54,6 @@ const AuthNav = () => {
})
break
case Themes.DARK:
case Themes.DODONA:
case Themes.LIGHT:
app.setTheme(menu.key as Themes)
break
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/pages/index/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Button, Card, Segmented, Tooltip, Typography } from "antd"
import { Card, Segmented, Typography } from "antd"
import { useTranslation } from "react-i18next"
import CreateCourseModal from "./components/CreateCourseModal"
import { useEffect, useState } from "react"
import HorizontalCourseScroll from "./components/HorizontalCourseScroll"
import apiCall from "../../util/apiFetch"
import { ApiRoutes, GET_Responses } from "../../@types/requests.d"
import ProjectTable from "./components/ProjectTable"
Expand All @@ -18,7 +17,7 @@ type ProjectView = "table" | "timeline" | "calendar"

const Home = () => {
const { t } = useTranslation()
const [projects, setProjects] = useState<ProjectsType | null>(null)
const [projects, setProjects] = useLocalStorage<ProjectsType | null>("__projects_cache",null)
const [open, setOpen] = useState(false)
const [projectsViewMode, setProjectsViewMode] = useLocalStorage<ProjectView>("projects_view", "table")

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/providers/AppProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const AppProvider: FC<PropsWithChildren> = ({ children }) => {

const handleSetTheme = (theme: Themes) => {
setTheme(theme)
document.body.classList.remove(Themes.LIGHT + "-theme", Themes.DARK + "-theme", Themes.DODONA + "-theme")
document.body.classList.remove(Themes.LIGHT + "-theme", Themes.DARK + "-theme")
document.body.classList.add(theme + "-theme")
window.localStorage.setItem("theme", theme)
}
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/theme/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import useApp from "../hooks/useApp"
import {darkTheme} from "./themes/dark"
import {lightTheme} from "./themes/light"
import { Language, Themes } from "../@types/appTypes"
import { dodonaTheme } from "./themes/dodona"
import nlNL from 'antd/locale/nl_NL';
import enUS from 'antd/locale/en_US';

Expand All @@ -17,7 +16,6 @@ const i18n_locale = {
const appThemes:Record<Themes,ThemeConfig> = {
light: lightTheme,
dark: darkTheme,
dodona: dodonaTheme
}

const ThemeProvider: FC<PropsWithChildren> = ({ children }) => {
Expand Down

0 comments on commit a47cdd6

Please sign in to comment.