import * as React from 'react' import { useTheme } from 'next-themes' import { FaTwitter } from '@react-icons/all-files/fa/FaTwitter' import { FaZhihu } from '@react-icons/all-files/fa/FaZhihu' import { FaGithub } from '@react-icons/all-files/fa/FaGithub' import { FaLinkedin } from '@react-icons/all-files/fa/FaLinkedin' import { IoSunnyOutline } from '@react-icons/all-files/io5/IoSunnyOutline' import { IoMoonSharp } from '@react-icons/all-files/io5/IoMoonSharp' import * as config from 'lib/config' import styles from './styles.module.css' // TODO: merge the data and icons from PageSocial with the social links in Footer export const FooterImpl: React.FC = () => { const [hasMounted, setHasMounted] = React.useState(false) const { setTheme, resolvedTheme } = useTheme() const onToggleDarkMode = React.useCallback( (e) => { e.preventDefault() setTheme(resolvedTheme === 'light' ? 'dark' : 'light') }, [resolvedTheme, setTheme] ) React.useEffect(() => { setHasMounted(true) }, []) return ( ) } export const Footer = React.memo(FooterImpl)