Fix build errors: add typed params, use client tags, and Docker build args

This commit is contained in:
2026-04-14 12:39:22 +03:00
parent 8b1bdfd3c6
commit 429495a955
5 changed files with 34 additions and 7 deletions

View File

@@ -10,11 +10,11 @@ import { CldImage } from "next-cloudinary";
import { useTranslations, useLocale } from "next-intl";
interface PageProps {
params: Promise<{ slug: string }>;
params: Promise<{ locale: string; slug: string }>;
}
export default function YachtPage({ params }: PageProps) {
const { slug } = use(params);
const { slug, locale: _locale } = use(params);
const yacht = yachts.find((y) => y.slug === slug);
const [lightboxIndex, setLightboxIndex] = useState<number | null>(null);
const t = useTranslations('FleetDetail');

View File

@@ -1,9 +1,17 @@
'use client';
import { use } from "react";
import { yachts } from "../../data/yachts";
import { Link } from "@/i18n/routing";
import { useTranslations, useLocale } from "next-intl";
import { CldImage } from "next-cloudinary";
export default function FleetPage() {
interface PageProps {
params: Promise<{ locale: string }>;
}
export default function FleetPage({ params }: PageProps) {
const { locale: _locale } = use(params);
const t = useTranslations('FleetList');
const locale = useLocale();
return (