Use basePath for internal links and export from next.config.ts
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import Link from 'next/link';
|
||||
import {basePath} from "@/next.config";
|
||||
|
||||
export default function Footer() {
|
||||
return (
|
||||
@@ -9,10 +10,10 @@ export default function Footer() {
|
||||
<p>© {new Date().getFullYear()} Kanzlei Mustermann. Alle Rechte vorbehalten.</p>
|
||||
</div>
|
||||
<div className="space-x-4">
|
||||
<Link href="/impressum/" className="hover:underline">Impressum</Link>
|
||||
<Link href="/datenschutz/" className="hover:underline">Datenschutz</Link>
|
||||
<Link href={`${basePath}/impressum/`} className="hover:underline">Impressum</Link>
|
||||
<Link href={`${basePath}/datenschutz/`} className="hover:underline">Datenschutz</Link>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import Link from 'next/link';
|
||||
import {motion} from 'framer-motion';
|
||||
import {basePath} from "@/next.config";
|
||||
|
||||
export default function Navbar() {
|
||||
return (
|
||||
@@ -12,14 +13,14 @@ export default function Navbar() {
|
||||
className="fixed top-0 left-0 right-0 z-50 bg-white shadow-md py-4 px-6 md:px-12 lg:px-24 text-gray-900"
|
||||
>
|
||||
<div className="flex justify-between items-center">
|
||||
<Link href="/">
|
||||
<Link href={`${basePath}/`}>
|
||||
<span className="text-xl font-bold text-blue-800">Kanzlei Mustermann</span>
|
||||
</Link>
|
||||
<div className="space-x-6 text-sm md:text-base">
|
||||
<Link href="/">Start</Link>
|
||||
<Link href="/ueber-uns/">Über uns</Link>
|
||||
<Link href="/impressum/">Impressum</Link>
|
||||
<Link href="/datenschutz/">Datenschutz</Link>
|
||||
<Link href={`${basePath}/`}>Start</Link>
|
||||
<Link href={`${basePath}/ueber-uns/`}>Über uns</Link>
|
||||
<Link href={`${basePath}/impressum/`}>Impressum</Link>
|
||||
<Link href={`${basePath}/datenschutz/`}>Datenschutz</Link>
|
||||
</div>
|
||||
</div>
|
||||
</motion.nav>
|
||||
|
||||
Reference in New Issue
Block a user