Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update footer copyright with funtion,get current year #432

Closed
wants to merge 2 commits into from

Conversation

loda13
Copy link

@loda13 loda13 commented Jan 3, 2023

update
components/Footer.tsx

from 2022 to 2023

@vercel
Copy link

vercel bot commented Jan 3, 2023

@loda13 is attempting to deploy a commit to the Saasify Team on Vercel.

A member of the Team first needs to authorize it.

@oeyoews
Copy link

oeyoews commented Jan 4, 2023

update components/Footer.tsx

from 2022 to 2023

Maybe use new Date().getFullYear() is better

use new Date().getFullYear()
@loda13
Copy link
Author

loda13 commented Jan 5, 2023

update components/Footer.tsx
from 2022 to 2023

Maybe use new Date().getFullYear() is better

good idea,thx

@loda13
Copy link
Author

loda13 commented Jan 5, 2023

Visit this URL to preview:
https://nextjs-notion-starter-h92t0mivw-loda.vercel.app/

@loda13 loda13 changed the title update 2023 update footer copyright with funtion,get current year Jan 5, 2023
@@ -33,9 +33,11 @@ export const FooterImpl: React.FC = () => {
setHasMounted(true)
}, [])

const currentYear = new Date().getFullYear();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably fine.. but in general, injecting any date-related text into server-rendered pages can cause issues with react hydration

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,old way is better #476

@transitive-bullshit
Copy link
Owner

Closing in favor of #479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants