Refactor navigation paths and centralize URL management by introducing a Links configuration; update Footer and Navbar components and rename route files for consistency.
This commit is contained in:
8
lawfirm-demos/demo-1/app/Links.ts
Normal file
8
lawfirm-demos/demo-1/app/Links.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
const Links = {
|
||||||
|
home: '/',
|
||||||
|
about: '/ueber-uns/',
|
||||||
|
imprint: '/impressum/',
|
||||||
|
privacy: '/datenschutz/',
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Links;
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
import Links from "@/app/Links";
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
return (
|
return (
|
||||||
@@ -9,8 +10,10 @@ export default function Footer() {
|
|||||||
<p>© {new Date().getFullYear()} Kanzlei Mustermann. Alle Rechte vorbehalten.</p>
|
<p>© {new Date().getFullYear()} Kanzlei Mustermann. Alle Rechte vorbehalten.</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-x-4">
|
<div className="space-x-4">
|
||||||
<Link href="/app/imprint/" className="hover:underline">Impressum</Link>
|
<div className="space-x-4">
|
||||||
<Link href="/app/privacy/" className="hover:underline">Datenschutz</Link>
|
<Link href={Links.imprint} className="hover:underline">Impressum</Link>
|
||||||
|
<Link href={Links.privacy} className="hover:underline">Datenschutz</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import {motion} from 'framer-motion';
|
import {motion} from 'framer-motion';
|
||||||
|
import Links from "@/app/Links";
|
||||||
|
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
return (
|
return (
|
||||||
@@ -16,10 +17,10 @@ export default function Navbar() {
|
|||||||
<span className="text-xl font-bold text-blue-800">Kanzlei Mustermann</span>
|
<span className="text-xl font-bold text-blue-800">Kanzlei Mustermann</span>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="space-x-6 text-sm md:text-base">
|
<div className="space-x-6 text-sm md:text-base">
|
||||||
<Link href={`/`}>Start</Link>
|
<Link href={Links.home}>Start</Link>
|
||||||
<Link href={`/about/`}>Über uns</Link>
|
<Link href={Links.about}>Über uns</Link>
|
||||||
<Link href={`/imprint/`}>Impressum</Link>
|
<Link href={Links.imprint}>Impressum</Link>
|
||||||
<Link href={`/privacy/`}>Datenschutz</Link>
|
<Link href={Links.privacy}>Datenschutz</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</motion.nav>
|
</motion.nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user