Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Link } from 'gatsby';
import { useIsFirstRender } from '../hooks';

import cn from 'classnames';

Expand All @@ -25,6 +26,9 @@ const externalLink = {
};

const Footer = () => {
const isFirstRender = useIsFirstRender();
const currentYear = isFirstRender ? undefined : new Date().getFullYear();

return (
<footer className={cn(cols, css.root)}>
<div className={css.logoMobile}>
Expand Down Expand Up @@ -215,8 +219,8 @@ const Footer = () => {

<div className={css.copyright}>
<span>
2016-{new Date().getFullYear()} The Coding Train. All rights reserved.
Built in collaboration with{' '}
2016-{currentYear} The Coding Train. All rights reserved. Built in
collaboration with{' '}
<a href="https://designsystems.international/" {...externalLink}>
Design System International
</a>
Expand Down
Loading