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

feat: dynamic copyright year Footer #58

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions frontend/src/components/Layout/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
footerSupportLinks,
} from "../../static/data";

// Dynamic copyright year based on current year
const currentYear = new Date().getFullYear();

const Footer = () => {
return (
Expand Down Expand Up @@ -110,7 +112,7 @@ const Footer = () => {
className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-10
text-center pt-2 text-gray-400 text-sm pb-8"
>
<span>© {new Date().getFullYear()} LA. All rights reserved.</span>
<span>© {currentYear} LA. All rights reserved.</span>
<span>Terms · Privacy Policy</span>
<div className="sm:block flex items-center justify-center w-full">
<img
Expand All @@ -123,4 +125,5 @@ const Footer = () => {
);
};

export default Footer;
// Memoize the component to prevent unnecessary re-renders
export default memo(Footer);