Skip to content

Commit

Permalink
Update footer year for Theology 101 website (#4)
Browse files Browse the repository at this point in the history
## 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)
  • Loading branch information
Pinimes committed Nov 23, 2023
1 parent 8e7b3e3 commit 7d7ac0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -40,7 +41,10 @@ export function Footer({ children }) {
</div>
</div>
<div className={css.copyright}>
<p>&copy; Awe and Reverence 2020</p>
<p>
&copy; Awe and Reverence {YEAR_CREATED}
{YEAR_CREATED != CURRENT_YEAR ? ` - ${CURRENT_YEAR}` : ''}
</p>
</div>
</footer>
</>
Expand Down
3 changes: 3 additions & 0 deletions constants/date.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export const CURRENT_YEAR = new Date().getFullYear();

export const YEAR_CREATED = "2023";

0 comments on commit 7d7ac0a

Please sign in to comment.