diff --git a/src/footer.js b/src/footer.js index 45d21be..f7b4b7d 100644 --- a/src/footer.js +++ b/src/footer.js @@ -1,13 +1,16 @@ -import React from 'react' +import React, { useState, useEffect } from 'react' import { Box, Flex, Link } from 'theme-ui' import { default as NextLink } from 'next/link' import Monogram from './monogram' import Row from './row' import Column from './column' -const getCurrentYear = () => new Date().getFullYear() - const Footer = () => { + const [year, setYear] = useState(null) + useEffect(() => { + setYear(new Date().getFullYear()) + }, []) + return ( { gap: [0, 0, '10px', '12px'], }} > - (c) {getCurrentYear()} + (c) {year} CARBONPLAN