@@ -7,49 +7,18 @@ import { FaMastodon } from '@react-icons/all-files/fa/FaMastodon'
7
7
import { FaTwitter } from '@react-icons/all-files/fa/FaTwitter'
8
8
import { FaYoutube } from '@react-icons/all-files/fa/FaYoutube'
9
9
import { FaZhihu } from '@react-icons/all-files/fa/FaZhihu'
10
- import { IoMoonSharp } from '@react-icons/all-files/io5/IoMoonSharp'
11
- import { IoSunnyOutline } from '@react-icons/all-files/io5/IoSunnyOutline'
12
10
13
11
import * as config from '@/lib/config'
14
- import { useDarkMode } from '@/lib/use-dark-mode'
15
12
16
13
import styles from './styles.module.css'
17
14
18
15
// TODO: merge the data and icons from PageSocial with the social links in Footer
19
16
20
17
export const FooterImpl : React . FC = ( ) => {
21
- const [ hasMounted , setHasMounted ] = React . useState ( false )
22
- const { isDarkMode, toggleDarkMode } = useDarkMode ( )
23
-
24
- const onToggleDarkMode = React . useCallback (
25
- ( e ) => {
26
- e . preventDefault ( )
27
- toggleDarkMode ( )
28
- } ,
29
- [ toggleDarkMode ]
30
- )
31
-
32
- React . useEffect ( ( ) => {
33
- setHasMounted ( true )
34
- } , [ ] )
35
18
36
19
return (
37
20
< footer className = { styles . footer } >
38
- < div className = { styles . copyright } > Copyright 2022 { config . author } </ div >
39
-
40
- < div className = { styles . settings } >
41
- { hasMounted && (
42
- < a
43
- className = { styles . toggleDarkMode }
44
- href = '#'
45
- role = 'button'
46
- onClick = { onToggleDarkMode }
47
- title = 'Toggle dark mode'
48
- >
49
- { isDarkMode ? < IoMoonSharp /> : < IoSunnyOutline /> }
50
- </ a >
51
- ) }
52
- </ div >
21
+ < div className = { styles . copyright } > Copyright 2023 { config . author } </ div >
53
22
54
23
< div className = { styles . social } >
55
24
{ config . twitter && (
0 commit comments