Skip to content

Commit c5f90ef

Browse files
authored
Merge pull request #521 from Tilakmahajan/fix/footer-dynamic-year
fix: make footer copyright year dynamic
2 parents 62b9166 + 84ef376 commit c5f90ef

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

src/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"BaseTemplate": {
1111
"description": "Starter code for your Nextjs Boilerplate with Tailwind CSS",
12-
"made_with": "Made with <author></author>."
12+
"copyright": "Copyright © {year} {name}."
1313
},
1414
"Index": {
1515
"meta_title": "Next.js Boilerplate Presentation",

src/locales/fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"BaseTemplate": {
1111
"description": "Code de démarrage pour Next.js avec Tailwind CSS",
12-
"made_with": "Fait avec <author></author>."
12+
"copyright": "Droits d'auteur © {year} {name}."
1313
},
1414
"Index": {
1515
"meta_title": "Présentation de Next.js Boilerplate",

src/templates/BaseTemplate.tsx

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,12 @@ export const BaseTemplate = (props: {
3737
<main>{props.children}</main>
3838

3939
<footer className="border-t border-gray-300 py-8 text-center text-sm">
40-
{`© Copyright ${new Date().getFullYear()} ${AppConfig.name}. `}
41-
{t.rich('made_with', {
42-
author: () => (
43-
<a
44-
href="https://nextjs-boilerplate.com"
45-
className="text-blue-700 hover:border-b-2 hover:border-blue-700"
46-
>
47-
Next.js Boilerplate
48-
</a>
49-
),
40+
{t('copyright', {
41+
year: new Date().getFullYear(),
42+
name: AppConfig.name,
5043
})}
44+
{' '}
45+
5146
{/*
5247
* PLEASE READ THIS SECTION
5348
* I'm an indie maker with limited resources and funds, I'll really appreciate if you could have a link to my website.

0 commit comments

Comments
 (0)