File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change
1
+ "use client" ;
1
2
import Image from "next/image" ;
2
3
import Link from "next/link" ;
3
4
import { Button } from "@/components/ui/button" ;
@@ -14,8 +15,17 @@ import { SocialLinks } from "@/components/SocialLinks";
14
15
import { Highlight } from "@/components/ui/hero-hihglight" ;
15
16
import PricingCard from "@/components/LandingComponents/PriceCard" ;
16
17
import Navbar1 from "@/components/navbar" ;
18
+ import { useEffect , useState } from "react" ;
17
19
18
20
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
+ } , [ ] ) ;
19
29
return (
20
30
< div className = "flex flex-col min-h-screen bg-background" >
21
31
< Navbar1 />
@@ -368,7 +378,7 @@ export default function LandingPage() {
368
378
</ div >
369
379
< div className = "flex flex-col md:flex-row justify-between items-center pt-8 border-t border-border" >
370
380
< p className = "text-sm text-muted-foreground mb-4 md:mb-0" >
371
- © 2023 LeetCode Journal. All rights reserved.
381
+ © { currentYear } LeetCode Journal. All rights reserved.
372
382
</ p >
373
383
</ div >
374
384
</ div >
You can’t perform that action at this time.
0 commit comments