UPDATE: readded contact information to footer
This commit is contained in:
@@ -14,18 +14,18 @@ const Footer = () => {
|
||||
if (email) {
|
||||
if (email.trim() === "") return;
|
||||
try {
|
||||
const response = await fetch(`/api/send_newsletter/${email}`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
const response = await fetch(`/api/send_newsletter/${email}`,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("Failed to subscribe");
|
||||
}
|
||||
|
||||
|
||||
setEmail("");
|
||||
alert("Successfully added to newsletter");
|
||||
|
||||
@@ -37,19 +37,30 @@ const Footer = () => {
|
||||
|
||||
return (
|
||||
<footer className="absolute bottom-0 h-[12vh] w-full p-4 bg-gradient-to-b from-white/0 via-[#3a0ca3]/50 to-[#3a0ca3] text-white">
|
||||
<div className="flex justify-between gap-x-10 gap-y-6 flex-wrap">
|
||||
<div className="flex flex-wrap justify-between gap-x-10 gap-y-6">
|
||||
{/* About Section */}
|
||||
<div className="flex-[2] min-w-[50px] shrink">
|
||||
<div className="flex-1 min-w-[250px]">
|
||||
<h2 className="text-2xl font-bold">Gander</h2>
|
||||
<p className="text-sm mt-2">
|
||||
Your very favourite streaming service
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Office Section */}
|
||||
<div className="flex-1 min-w-[200px]">
|
||||
<h3 className="text-lg font-semibold mb-2">Contact Us!</h3>
|
||||
<a href="mailto:xyzemail@gmail.com" className="underline">
|
||||
response.gander@gmail.com
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{/* Newsletter Section */}
|
||||
<div className="flex-1 min-w-[100px] shrink">
|
||||
<h3 className="text-lg font-semibold mb-2 pl-2">Our Newsletter</h3>
|
||||
<div className="flex-1 min-w-[250px]">
|
||||
<h3 className="text-lg font-semibold mb-2">Newsletter</h3>
|
||||
<div className="flex items-center border-b border-white py-2">
|
||||
<input
|
||||
type="email"
|
||||
placeholder="Enter your email"
|
||||
<input
|
||||
type="email"
|
||||
placeholder="Enter your email"
|
||||
className="bg-transparent outline-none text-sm flex-1 px-2"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
@@ -57,13 +68,15 @@ const Footer = () => {
|
||||
/>
|
||||
<MailIcon className="text-white cursor-pointer" onClick={send_newsletter} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Footer Bottom */}
|
||||
<div className="text-center text-xs border-t border-gray-600 mt-6 pt-4">Group 11</div>
|
||||
<div className="text-center text-xs border-t border-gray-600 mt-6 pt-4">
|
||||
Group 11
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
||||
export default Footer;
|
||||
Reference in New Issue
Block a user