1
+ "use client"
1
2
import { Separator } from "./ui/separator" ;
2
3
import ccLogo from "../assets/codechef_logo.svg" ;
3
4
import Image from "next/image" ;
@@ -7,10 +8,14 @@ import x_twitter_icon from "../assets/x_twitter_icon.svg";
7
8
import meta_icon_dark from "../assets/meta_icon_dark.svg" ;
8
9
import x_twitter_icon_dark from "../assets/x_twitter_icon_dark.svg" ;
9
10
import Link from "next/link" ;
11
+ import { useTheme } from "next-themes" ;
10
12
11
13
export default function Footer ( ) {
14
+ const { theme, setTheme } = useTheme ( ) ;
15
+ const isDarkMode = theme === "dark" ;
16
+
12
17
return (
13
- < div className = "mx-auto flex flex-col items-center justify-between gap-y-12 pt-12 lg:w-full lg:flex-row lg:px-12" >
18
+ < div className = "mx-auto flex flex-col items-center justify-between lg:justify-around gap-y-12 pt-12 md:pt-8 lg:w-full lg:flex-row lg:px-12" >
14
19
< div className = "flex items-center" >
15
20
< h1 className = "jost bg-gradient-to-r from-[#562EE7] to-[#FFC6E8] bg-clip-text text-center text-3xl font-bold text-transparent lg:text-5xl" >
16
21
Papers
@@ -40,38 +45,16 @@ export default function Footer() {
40
45
</ Link >
41
46
< Link href = "https://www.facebook.com/codechefvit/" >
42
47
< Image
43
- src = { meta_icon }
44
- alt = "meta-icon"
45
- height = { 24 }
46
- width = { 24 }
47
- className = "dark:hidden"
48
- />
49
- </ Link >
50
-
51
- < Link href = "https://www.facebook.com/codechefvit/" >
52
- < Image
53
- src = { meta_icon_dark }
48
+ src = { isDarkMode ? meta_icon : meta_icon_dark }
54
49
alt = "meta-icon"
55
- className = "hidden dark:block"
56
50
height = { 24 }
57
51
width = { 24 }
58
52
/>
59
53
</ Link >
60
54
< Link href = "https://x.com/codechefvit" >
61
55
< Image
62
- src = { x_twitter_icon }
63
- alt = "x_twitter_icon"
64
- className = "dark:hidden"
65
- height = { 24 }
66
- width = { 24 }
67
- />
68
- </ Link >
69
-
70
- < Link href = "https://x.com/codechefvit" >
71
- < Image
72
- src = { x_twitter_icon_dark }
56
+ src = { isDarkMode ? x_twitter_icon : x_twitter_icon_dark }
73
57
alt = "x_twitter_icon"
74
- className = "mb-2 hidden dark:block"
75
58
height = { 24 }
76
59
width = { 24 }
77
60
/>
0 commit comments