Skip to content

Commit d990300

Browse files
committed
Calculate current year and display in footer
1 parent a5bf537 commit d990300

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/Footer.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,14 @@ export const FooterImpl: React.FC = () => {
2929
setHasMounted(true)
3030
}, [])
3131

32+
// Current year: 2022
33+
const year = `${new Date().getFullYear()}`
34+
3235
return (
3336
<footer className={styles.footer}>
34-
<div className={styles.copyright}>Copyright 2022 {config.author}</div>
37+
<div className={styles.copyright}>
38+
Copyright {year} {config.author}
39+
</div>
3540

3641
<div className={styles.settings}>
3742
{hasMounted && (

0 commit comments

Comments
 (0)