File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { Link } from 'gatsby' ;
3
+ import { useIsFirstRender } from '../hooks' ;
3
4
4
5
import cn from 'classnames' ;
5
6
@@ -25,6 +26,9 @@ const externalLink = {
25
26
} ;
26
27
27
28
const Footer = ( ) => {
29
+ const isFirstRender = useIsFirstRender ( ) ;
30
+ const currentYear = isFirstRender ? undefined : new Date ( ) . getFullYear ( ) ;
31
+
28
32
return (
29
33
< footer className = { cn ( cols , css . root ) } >
30
34
< div className = { css . logoMobile } >
@@ -215,8 +219,8 @@ const Footer = () => {
215
219
216
220
< div className = { css . copyright } >
217
221
< span >
218
- 2016-{ new Date ( ) . getFullYear ( ) } The Coding Train. All rights reserved.
219
- Built in collaboration with{ ' ' }
222
+ 2016-{ currentYear } The Coding Train. All rights reserved. Built in
223
+ collaboration with{ ' ' }
220
224
< a href = "https://designsystems.international/" { ...externalLink } >
221
225
Design System International
222
226
</ a >
You can’t perform that action at this time.
0 commit comments