Enhance Footer component by adding an Admin Panel link and updating quick links to support scroll behavior. Replace button elements with Next.js Link for navigation to the Admin Panel.
This commit is contained in:
parent
c80c05e74d
commit
72860dc63d
@ -3,6 +3,7 @@
|
|||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
import { Heart, Mail, Phone, MapPin } from "lucide-react";
|
import { Heart, Mail, Phone, MapPin } from "lucide-react";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
export function Footer() {
|
export function Footer() {
|
||||||
const [isDark, setIsDark] = useState(false);
|
const [isDark, setIsDark] = useState(false);
|
||||||
@ -30,10 +31,11 @@ export function Footer() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const quickLinks = [
|
const quickLinks = [
|
||||||
{ name: 'Home', href: '#home' },
|
{ name: 'Home', href: '#home', isScroll: true },
|
||||||
{ name: 'About', href: '#about' },
|
{ name: 'About', href: '#about', isScroll: true },
|
||||||
{ name: 'Services', href: '#services' },
|
{ name: 'Services', href: '#services', isScroll: true },
|
||||||
{ name: 'Contact', href: '#contact' },
|
{ name: 'Contact', href: '#contact', isScroll: true },
|
||||||
|
{ name: 'Admin Panel', href: '/login', isScroll: false },
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -88,12 +90,21 @@ export function Footer() {
|
|||||||
<ul className="space-y-2">
|
<ul className="space-y-2">
|
||||||
{quickLinks.map((link) => (
|
{quickLinks.map((link) => (
|
||||||
<li key={link.name}>
|
<li key={link.name}>
|
||||||
|
{link.isScroll ? (
|
||||||
<button
|
<button
|
||||||
onClick={() => scrollToSection(link.href.replace('#', ''))}
|
onClick={() => scrollToSection(link.href.replace('#', ''))}
|
||||||
className="text-sm text-muted-foreground hover:text-rose-600 dark:hover:text-rose-400 transition-colors cursor-pointer hover:translate-x-1 inline-block transition-transform"
|
className="text-sm text-muted-foreground hover:text-rose-600 dark:hover:text-rose-400 transition-colors cursor-pointer hover:translate-x-1 inline-block transition-transform"
|
||||||
>
|
>
|
||||||
{link.name}
|
{link.name}
|
||||||
</button>
|
</button>
|
||||||
|
) : (
|
||||||
|
<Link
|
||||||
|
href={link.href}
|
||||||
|
className="text-sm text-muted-foreground hover:text-rose-600 dark:hover:text-rose-400 transition-colors cursor-pointer hover:translate-x-1 inline-block transition-transform"
|
||||||
|
>
|
||||||
|
{link.name}
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user