diff --git a/components/Footer.tsx b/components/Footer.tsx index 44d0aba..cc9d150 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,19 +1,24 @@ "use client"; import { useEffect, useState } from "react"; -import { getSettings } from "@/app/actions"; +import { getSettings, getLocations } from "@/app/actions"; import Link from "next/link"; import DynamicLogo from "./DynamicLogo"; export default function Footer() { const [settings, setSettings] = useState(null); + const [locations, setLocations] = useState([]); useEffect(() => { - async function fetchSettings() { - const data = await getSettings(); - if (data) setSettings(data); + async function fetchData() { + const [sData, lData] = await Promise.all([ + getSettings(), + getLocations() + ]); + if (sData) setSettings(sData); + if (lData) setLocations(lData); } - fetchSettings(); + fetchData(); }, []); return ( @@ -23,7 +28,7 @@ export default function Footer() {
{/* Left Column - Logo & Description */} -
+
{/* Logo */}
@@ -43,6 +48,22 @@ export default function Footer() {

+ {/* Regions Column - Dynamic districts */} +
+ Bölgeler +
+ {locations.map((loc) => ( + + {loc.name} + + ))} +
+
+ {/* Center Column - Menu label + divider */}
@@ -52,7 +73,7 @@ export default function Footer() {
{/* Right Column - Navigation Links */} -
+
{[ { label: "Çalışmalar", href: "/works" }, { label: "Hizmetler", href: "/services" }, @@ -63,7 +84,7 @@ export default function Footer() { {item.label}