From 7d7ac0a7ab68a2da3a58e2e21cb7f91e152bf3f5 Mon Sep 17 00:00:00 2001 From: Peniel Mesele <144367037+Pinimes@users.noreply.github.com> Date: Thu, 23 Nov 2023 10:26:01 +0300 Subject: [PATCH] Update footer year for Theology 101 website (#4) ## Status Ready ## Description Update footer year for Theology101 website by adding a condition to show the current year only if it is different from the created year. ## Screenshot ![image](https://github.com/aweandreverence/www.theology101.church/assets/144367037/df379a08-f364-4cfe-92cb-56ba2a590636) ![footer](https://github.com/aweandreverence/www.theology101.church/assets/144367037/b41802a6-7ad6-480f-8908-5f3be0a9ba97) --- components/footer.js | 6 +++++- constants/date.js | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 constants/date.js diff --git a/components/footer.js b/components/footer.js index 267212f..d1d7c7e 100644 --- a/components/footer.js +++ b/components/footer.js @@ -8,6 +8,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import '@fortawesome/fontawesome-svg-core/styles.css'; import css from '../styles/footer.module.scss'; +import { CURRENT_YEAR, YEAR_CREATED } from '../constants/date'; library.add(fab, faFacebookF, faTwitter); @@ -40,7 +41,10 @@ export function Footer({ children }) {
© Awe and Reverence 2020
++ © Awe and Reverence {YEAR_CREATED} + {YEAR_CREATED != CURRENT_YEAR ? ` - ${CURRENT_YEAR}` : ''} +