Skip to content

Commit e6be8ca

Browse files
committed
feature: Update copyright year automatically
1 parent 6e5aa56 commit e6be8ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/Footer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import styles from './styles.module.css'
2020
export const FooterImpl: React.FC = () => {
2121
const [hasMounted, setHasMounted] = React.useState(false)
2222
const { isDarkMode, toggleDarkMode } = useDarkMode()
23+
const currentYear = new Date().getFullYear()
2324

2425
const onToggleDarkMode = React.useCallback(
2526
(e) => {
@@ -35,7 +36,7 @@ export const FooterImpl: React.FC = () => {
3536

3637
return (
3738
<footer className={styles.footer}>
38-
<div className={styles.copyright}>Copyright 2022 {config.author}</div>
39+
<div className={styles.copyright}>Copyright { currentYear } {config.author}</div>
3940

4041
<div className={styles.settings}>
4142
{hasMounted && (

0 commit comments

Comments
 (0)