mirror of
https://github.com/IgnatZakalinsky/home-works.git
synced 2026-01-28 12:32:45 +00:00
add dark theme support and some basic styles
This commit is contained in:
@@ -5,20 +5,26 @@ import HW1 from '../s2-homeworks/hw01/HW1'
|
||||
// import HW3 from '../s2-homeworks/hw03/HW3'
|
||||
// import HW4 from '../s2-homeworks/hw04/HW4'
|
||||
import HW5 from '../s2-homeworks/hw05/HW5'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
const App = () => {
|
||||
return (
|
||||
<div className={s.App}>
|
||||
<div>react homeworks:</div>
|
||||
const themeId = useSelector((state: any) => state.theme.themeId)
|
||||
useEffect(() => {
|
||||
document.documentElement.dataset.theme = themeId
|
||||
}, [themeId])
|
||||
return (
|
||||
<div className={s.App} data-theme={themeId}>
|
||||
<div>react homeworks:</div>
|
||||
|
||||
{/*<HW1/>*/}
|
||||
{/*<HW2/>*/}
|
||||
{/*<HW3/>*/}
|
||||
{/*<HW4/>*/}
|
||||
{/*<HW1/>*/}
|
||||
{/*<HW2/>*/}
|
||||
{/*<HW3/>*/}
|
||||
{/*<HW4/>*/}
|
||||
|
||||
<HW5/>
|
||||
</div>
|
||||
)
|
||||
<HW5 />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default App
|
||||
export default App
|
||||
|
||||
Reference in New Issue
Block a user