Files
MarkusandDevin <158243242+devin-ai-integration[bot]@users.noreply.github.com> 2b24334bfa 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>
2026-08-19 22:54:49 +02:00

41 lines
1.0 KiB
TypeScript

"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>
);
}