Skip to content

Commit 0f68753

Browse files
authored
Fixes #18 Footer UI and Year update
1 parent 4389cc5 commit 0f68753

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

Diff for: app/page.tsx

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use client";
12
import Image from "next/image";
23
import Link from "next/link";
34
import { Button } from "@/components/ui/button";
@@ -14,8 +15,17 @@ import { SocialLinks } from "@/components/SocialLinks";
1415
import { Highlight } from "@/components/ui/hero-hihglight";
1516
import PricingCard from "@/components/LandingComponents/PriceCard";
1617
import Navbar1 from "@/components/navbar";
18+
import { useEffect, useState } from "react";
1719

1820
export default function LandingPage() {
21+
const [currentYear, setCurrentYear] = useState<number>(
22+
new Date().getFullYear()
23+
);
24+
25+
useEffect(() => {
26+
// Set the current year dynamically on mount
27+
setCurrentYear(new Date().getFullYear());
28+
}, []);
1929
return (
2030
<div className="flex flex-col min-h-screen bg-background">
2131
<Navbar1 />
@@ -222,7 +232,9 @@ export default function LandingPage() {
222232
</div>
223233
</section>
224234
</main>
225-
<footer className="w-full py-12 px-4 md:px-6 border-t bg-secondary">
235+
<footer className="w-full pt-8 pb-4 px-4 md:px-6 border-t bg-secondary">
236+
{/* <-- Changed pt-12 into pt-8 and pb-4 to reduce unnecessary padding */}
237+
226238
<div className="container mx-auto">
227239
<div className="flex flex-col md:flex-row justify-between items-center mb-8">
228240
<div className="flex items-center space-x-4 mb-4 md:mb-0">
@@ -366,9 +378,10 @@ export default function LandingPage() {
366378
</ul>
367379
</div>
368380
</div>
369-
<div className="flex flex-col md:flex-row justify-between items-center pt-8 border-t border-border">
381+
<div className="flex flex-col md:flex-row justify-center items-center pt-8 border-t border-border">
382+
{/* <-- Changed justify-between into justify-center to center the copyright statement*/}
370383
<p className="text-sm text-muted-foreground mb-4 md:mb-0">
371-
© 2023 LeetCode Journal. All rights reserved.
384+
© {currentYear} LeetCode Journal. All rights reserved.
372385
</p>
373386
</div>
374387
</div>

0 commit comments

Comments
 (0)