Skip to content
This repository was archived by the owner on May 12, 2023. It is now read-only.

Commit 9560bdd

Browse files
committed
Removes dark mode and updates copy year
1 parent 7923b55 commit 9560bdd

File tree

1 file changed

+1
-32
lines changed

1 file changed

+1
-32
lines changed

components/Footer.tsx

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,18 @@ import { FaMastodon } from '@react-icons/all-files/fa/FaMastodon'
77
import { FaTwitter } from '@react-icons/all-files/fa/FaTwitter'
88
import { FaYoutube } from '@react-icons/all-files/fa/FaYoutube'
99
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'
1210

1311
import * as config from '@/lib/config'
14-
import { useDarkMode } from '@/lib/use-dark-mode'
1512

1613
import styles from './styles.module.css'
1714

1815
// TODO: merge the data and icons from PageSocial with the social links in Footer
1916

2017
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-
}, [])
3518

3619
return (
3720
<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>
5322

5423
<div className={styles.social}>
5524
{config.twitter && (

0 commit comments

Comments
 (0)