Skip to content

Commit 1ba5196

Browse files
committed
added socials to bottom of side menu
1 parent 62d7c44 commit 1ba5196

File tree

1 file changed

+73
-51
lines changed

1 file changed

+73
-51
lines changed

frontend/src/components/Hamburger.tsx

Lines changed: 73 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import React, { useState, useEffect } from 'react';
22
import ReactDOM from 'react-dom';
33
import { Menu, X } from 'lucide-react';
44
import Link from 'next/link';
5+
import Image from 'next/image';
6+
import { socialLinks } from '@/../public/data/socialInfos';
57

68
const Hamburger = () => {
79
// Needs dom element to be same bfore and after
@@ -33,8 +35,8 @@ const Hamburger = () => {
3335
}
3436

3537
return () => {
36-
document.body.style.overflow = 'scroll';
37-
document.body.style.paddingRight = '0px';
38+
document.body.style.overflow = '';
39+
document.body.style.paddingRight = '';
3840
};
3941
}, [showMenu]);
4042

@@ -78,55 +80,75 @@ const Hamburger = () => {
7880
<X className="h-6 w-6" />
7981
</button>
8082

81-
<div className="p-6 pt-20 items-start flex flex-col gap-4">
82-
<Link
83-
href="/about"
84-
className="text-white text-lg p-3 hover:underline"
85-
onClick={closeMenu}
86-
>
87-
About Us
88-
</Link>
89-
90-
<Link
91-
href="/events"
92-
className="text-white text-lg p-3 hover:underline"
93-
onClick={closeMenu}
94-
>
95-
Events
96-
</Link>
97-
98-
<Link
99-
href="/resources"
100-
className="text-white text-lg p-3 hover:underline"
101-
onClick={closeMenu}
102-
>
103-
Resources
104-
</Link>
105-
106-
<Link
107-
href="/sponsors"
108-
className="text-white text-lg p-3 hover:underline"
109-
onClick={closeMenu}
110-
>
111-
Sponsors
112-
</Link>
113-
114-
<Link
115-
href="/contact-us"
116-
className="text-white text-lg p-3 hover:underline"
117-
onClick={closeMenu}
118-
>
119-
Contact Us
120-
</Link>
121-
122-
<a
123-
href="https://csesoc-merch.square.site/"
124-
target="_blank"
125-
className="text-white text-lg p-3 hover:underline"
126-
onClick={closeMenu}
127-
>
128-
Merch
129-
</a>
83+
<div className="p-6 pt-20 flex flex-col h-full">
84+
<div className="flex flex-col gap-4 items-start">
85+
<Link
86+
href="/about"
87+
className="text-white text-lg p-3 hover:underline"
88+
onClick={closeMenu}
89+
>
90+
About Us
91+
</Link>
92+
93+
<Link
94+
href="/events"
95+
className="text-white text-lg p-3 hover:underline"
96+
onClick={closeMenu}
97+
>
98+
Events
99+
</Link>
100+
101+
<Link
102+
href="/resources"
103+
className="text-white text-lg p-3 hover:underline"
104+
onClick={closeMenu}
105+
>
106+
Resources
107+
</Link>
108+
109+
<Link
110+
href="/sponsors"
111+
className="text-white text-lg p-3 hover:underline"
112+
onClick={closeMenu}
113+
>
114+
Sponsors
115+
</Link>
116+
117+
<Link
118+
href="/contact-us"
119+
className="text-white text-lg p-3 hover:underline"
120+
onClick={closeMenu}
121+
>
122+
Contact Us
123+
</Link>
124+
125+
<a
126+
href="https://csesoc-merch.square.site/"
127+
target="_blank"
128+
className="text-white text-lg p-3 hover:underline"
129+
onClick={closeMenu}
130+
>
131+
Merch
132+
</a>
133+
</div>
134+
135+
<div className="flex-1"></div>
136+
137+
<div className="flex gap-4 justify-center pb-6">
138+
{socialLinks.map((item, index) => {
139+
return (
140+
<a key={index} href={item.href}>
141+
<Image
142+
className="h-4 fill-white min-w-full hover:scale-125 transition-all"
143+
src={item.src}
144+
alt={item.alt}
145+
height={15}
146+
width={15}
147+
/>
148+
</a>
149+
);
150+
})}
151+
</div>
130152
</div>
131153
</div>
132154
</div>,

0 commit comments

Comments
 (0)