Initial upload of BB-Apartment 2026 website.
Adds the complete Next.js website including i18n routing, house and apartment pages, Beds24 v2 integration for live availability/pricing, Stripe checkout, contact forms, Docker setup and deployment docs. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
232770afe7
commit
2b24334bfa
@@ -0,0 +1,40 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { locales } from "@/i18n";
|
||||
|
||||
export function LanguageSwitcher({
|
||||
locale,
|
||||
scrolled = false,
|
||||
}: {
|
||||
locale: string;
|
||||
scrolled?: boolean;
|
||||
}) {
|
||||
const pathname = usePathname();
|
||||
const strippedPath = pathname.replace(`/${locale}`, "") || "/";
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`flex items-center gap-1 rounded-full p-1 transition-colors duration-300 ${
|
||||
scrolled ? "bg-brand-grey-soft" : "bg-white/10"
|
||||
}`}
|
||||
>
|
||||
{locales.map((l) => (
|
||||
<Link
|
||||
key={l}
|
||||
href={`/${l}${strippedPath}`}
|
||||
className={`px-3 py-1 rounded-full text-sm font-medium transition-colors duration-300 ${
|
||||
l === locale
|
||||
? "bg-brand-green text-white"
|
||||
: scrolled
|
||||
? "text-brand-grey hover:text-brand-green-dark"
|
||||
: "text-white/80 hover:text-white"
|
||||
}`}
|
||||
>
|
||||
{l.toUpperCase()}
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user