Skip to content

Footer made dynamic #53

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

Closed
wants to merge 2 commits 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
12 changes: 11 additions & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use client";
import Image from "next/image";
import Link from "next/link";
import { Button } from "@/components/ui/button";
Expand All @@ -14,8 +15,17 @@ import { SocialLinks } from "@/components/SocialLinks";
import { Highlight } from "@/components/ui/hero-hihglight";
import PricingCard from "@/components/LandingComponents/PriceCard";
import Navbar1 from "@/components/navbar";
import { useEffect, useState } from "react";

export default function LandingPage() {
const [currentYear, setCurrentYear] = useState<number>(
new Date().getFullYear()
);

useEffect(() => {
// Set the current year dynamically on mount
setCurrentYear(new Date().getFullYear());
}, []);
return (
<div className="flex flex-col min-h-screen bg-background">
<Navbar1 />
Expand Down Expand Up @@ -368,7 +378,7 @@ export default function LandingPage() {
</div>
<div className="flex flex-col md:flex-row justify-between items-center pt-8 border-t border-border">
<p className="text-sm text-muted-foreground mb-4 md:mb-0">
© 2023 LeetCode Journal. All rights reserved.
© {currentYear} LeetCode Journal. All rights reserved.
</p>
</div>
</div>
Expand Down
Loading