Skip to content

Commit a87b2f6

Browse files
committed
update curriculum
1 parent b46edd3 commit a87b2f6

File tree

10 files changed

+36
-34
lines changed

10 files changed

+36
-34
lines changed

src/app/App.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
import SidebarLayout from "./layouts/sidebar/sidebarLayout";
1+
import SidebarLayout from "./layouts/sidebar/sidebar-layout";
2+
import ThemeProvider from "./providers/theme-provider/theme-provider";
23

34
const App = () => {
45
return (
56
<>
6-
<SidebarLayout/>
7+
<ThemeProvider>
8+
<SidebarLayout/>
9+
</ThemeProvider>
710
</>
811
);
912
}

src/app/components/navigation-drawer/navigation-drawer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const NavigationDrawer = () => {
9898
</div>
9999
</Transition.Child>
100100
<div className="h-0 flex-1 overflow-y-auto pt-5 pb-4">
101-
<nav className="mt-5 space-y-1 px-2 space-y-4">
101+
<nav className="mt-5 px-2 space-y-4">
102102
<NavigationContent/>
103103
</nav>
104104
</div>
@@ -114,7 +114,7 @@ const NavigationDrawer = () => {
114114
<div className="hidden flex-none lg:flex lg:flex-col drawer border-r border-gray-200 bg-white">
115115
<div className="flex min-h-0 flex-1 flex-col">
116116
<div className="flex flex-1 flex-col overflow-y-auto pt-5 pb-4">
117-
<nav className="my-auto mx-10 space-y-1 px-2 space-y-4">
117+
<nav className="my-auto mx-10 px-2 space-y-4">
118118
<NavigationContent/>
119119
</nav>
120120
</div>

src/app/layouts/sidebar/sidebarLayout.jsx renamed to src/app/layouts/sidebar/sidebar-layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Router from "../../router/router";
22
import Header from "../../components/header/header";
33
import NavigationDrawer from "../../components/navigation-drawer/navigation-drawer";
4-
import './sidebar.scss';
4+
import './sidebar-layout.scss';
55

66
export default function SidebarLayout() {
77
return (
File renamed without changes.

src/app/layouts/theme-provider/theme-provider.jsx

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
import curriculum from "../../../assets/curriculum/curriculum.pdf";
2+
13
export default function CurriculumPage() {
24
return (
35
<>
6+
<iframe src={curriculum} width="100%" height="100%"/>
47
</>
58
)
69
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import {useSelector} from "react-redux";
2+
import {selectDarkMode} from "../../reducers/theme";
3+
import {useEffect} from "react";
4+
5+
export const ThemeProvider = ({children}) => {
6+
const isDarkMode = useSelector(selectDarkMode);
7+
const root = window.document.documentElement;
8+
9+
useEffect(() => {
10+
root.classList.remove('light', 'dark');
11+
root.classList.add(isDarkMode ? 'dark' : 'light');
12+
}, [])
13+
14+
return (
15+
<>
16+
{children}
17+
</>
18+
)
19+
}
20+
21+
export default ThemeProvider

src/app/utils/import-sgv-as-react-component.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React, {useEffect, useRef, useState} from "react";
1+
import {useEffect, useRef, useState} from "react";
22

33
function importSgvAsReactComponent(name, fileName) {
44
const ImportedIconRef = useRef();
55
const [loading, setLoading] = useState(true);
66

7-
useEffect(() => {
7+
useEffect( () => {
88
const importIcon = async () => {
99
try {
1010
ImportedIconRef.current = (await import(`../../assets/icons/${name}/${fileName}.svg`)).ReactComponent;
@@ -14,6 +14,7 @@ function importSgvAsReactComponent(name, fileName) {
1414
setLoading(false);
1515
}
1616
};
17+
1718
importIcon();
1819
}, []);
1920

src/styles/main.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ body {
1515
background-color: rgb(250 250 250);
1616
}
1717

18-
1918
#root {
2019
@apply flex;
2120
@apply flex-1;

tailwind.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const defaultTheme = require('tailwindcss/defaultTheme');
22

33
module.exports = {
4-
darkMode: 'class',
4+
darkMode: 'selector',
55
content: [
66
"./index.html",
77
"./src/**/*.{js,jsx,ts,tsx}",

0 commit comments

Comments
 (0)