-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Copyright component to reduce the logic in the Footer component. Add new global tailwind grey font variants. Add a new constant for the app copyright holder.
- Loading branch information
1 parent
11857c5
commit 55c7c12
Showing
5 changed files
with
38 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from "react"; | ||
|
||
// Constants | ||
import { COPYRIGHT_HOLDER } from "constants/app"; | ||
|
||
/** | ||
* Copyright component with the copyright holder and current year. | ||
* | ||
* @example | ||
* return ( | ||
* <Copyright /> | ||
* ) | ||
* @returns {React.Component} The footer component | ||
*/ | ||
function Copyright() { | ||
const currentYear = new Date().getFullYear(); | ||
|
||
return ( | ||
<span | ||
className="font-thin text-grey text-xs block text-center mx-auto" | ||
data-hj-allow | ||
> | ||
© All rights reserved {COPYRIGHT_HOLDER} {currentYear} | ||
</span> | ||
); | ||
} | ||
|
||
export default Copyright; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,9 +55,3 @@ | |
} | ||
} | ||
} | ||
|
||
.copyright { | ||
color: $grey; | ||
font-size: 0.625em; | ||
font-weight: 100; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ | |
* @type {string} | ||
*/ | ||
export const APP_TITLE = "React Frontend"; | ||
|
||
export const COPYRIGHT_HOLDER = "Joshua Booth"; |