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 11import React from 'react' ;
22import { Link } from 'gatsby' ;
3+ import { useIsFirstRender } from '../hooks' ;
34
45import cn from 'classnames' ;
56
@@ -25,6 +26,9 @@ const externalLink = {
2526} ;
2627
2728const Footer = ( ) => {
29+ const isFirstRender = useIsFirstRender ( ) ;
30+ const currentYear = isFirstRender ? undefined : new Date ( ) . getFullYear ( ) ;
31+
2832 return (
2933 < footer className = { cn ( cols , css . root ) } >
3034 < div className = { css . logoMobile } >
@@ -215,8 +219,8 @@ const Footer = () => {
215219
216220 < div className = { css . copyright } >
217221 < 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{ ' ' }
220224 < a href = "https://designsystems.international/" { ...externalLink } >
221225 Design System International
222226 </ a >
You can’t perform that action at this time.
0 commit comments