@@ -5,7 +5,6 @@ import { Link } from 'components/link'
5
5
import { Newsletter } from 'components/newsletter'
6
6
import Fab from 'components/fab'
7
7
import MobileNav from 'components/mobileNav'
8
- import { Donate } from 'components/donate'
9
8
import useLocalStorage from '../../hooks/useLocalStorage'
10
9
11
10
type Props = {
@@ -26,13 +25,17 @@ export function Main(props: Props) {
26
25
27
26
useEffect ( ( ) => {
28
27
if ( props . className ) setClassName ( `${ styles . container } ${ props . className } ${ theme } ` )
29
- } , [ theme ] )
28
+ } , [ props . className , theme ] )
30
29
31
30
return (
32
31
< div className = { className } >
33
32
< aside className = { styles . sitenav } >
34
33
< Sitenav />
35
- < select name = "theme_switcher" value = { theme } className = { styles . themeSwitcher } onChange = { ( e ) => setTheme ( e . target . value ) } >
34
+ < select
35
+ name = "theme_switcher"
36
+ value = { theme }
37
+ className = { styles . themeSwitcher }
38
+ onChange = { ( e ) => setTheme ( e . target . value ) } >
36
39
< option value = "light" > Light</ option >
37
40
< option value = "dark" > Dark</ option >
38
41
< option value = "pantone" > Pantone</ option >
@@ -42,12 +45,18 @@ export function Main(props: Props) {
42
45
< aside className = { styles . mobileSitenav } >
43
46
< MobileNav isOpen = { isMobileNavOpen } />
44
47
45
- { isMobileNavOpen && < select name = "theme_switcher" value = { theme } className = { styles . themeSwitcher } onChange = { ( e ) => setTheme ( e . target . value ) } >
46
- < option value = "light" > Light</ option >
47
- < option value = "dark" > Dark</ option >
48
- < option value = "pantone" > Pantone</ option >
49
- < option value = "blueberry_dark" > Blueberry Dark</ option >
50
- </ select > }
48
+ { isMobileNavOpen && (
49
+ < select
50
+ name = "theme_switcher"
51
+ value = { theme }
52
+ className = { styles . themeSwitcher }
53
+ onChange = { ( e ) => setTheme ( e . target . value ) } >
54
+ < option value = "light" > Light</ option >
55
+ < option value = "dark" > Dark</ option >
56
+ < option value = "pantone" > Pantone</ option >
57
+ < option value = "blueberry_dark" > Blueberry Dark</ option >
58
+ </ select >
59
+ ) }
51
60
</ aside >
52
61
< main className = { styles . content } >
53
62
< div className = { styles . inner } >
0 commit comments