Fix build errors: add typed params, use client tags, and Docker build args
This commit is contained in:
@@ -18,7 +18,13 @@ COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
# Environment variables must be present at build time for Next.js
|
||||
# Coolify will provide these, but we can set defaults
|
||||
ARG NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
|
||||
ARG CLOUDINARY_API_KEY
|
||||
ARG CLOUDINARY_API_SECRET
|
||||
|
||||
ENV NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME=$NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME
|
||||
ENV CLOUDINARY_API_KEY=$CLOUDINARY_API_KEY
|
||||
ENV CLOUDINARY_API_SECRET=$CLOUDINARY_API_SECRET
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
RUN npm run build
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
'use client';
|
||||
|
||||
import { use } from 'react';
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
export default function ContactPage() {
|
||||
interface PageProps {
|
||||
params: Promise<{ locale: string }>;
|
||||
}
|
||||
|
||||
export default function ContactPage({ params }: PageProps) {
|
||||
const { locale: _locale } = use(params);
|
||||
const t = useTranslations('Contact');
|
||||
return (
|
||||
<div className="pt-40 pb-24 px-6 md:px-24 min-h-screen bg-surface">
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -4,9 +4,14 @@ import { Link } from '@/i18n/routing';
|
||||
import { yachts } from '../data/yachts';
|
||||
import YachtCard from '../components/YachtCard';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { use } from 'react';
|
||||
|
||||
export default function Home() {
|
||||
interface PageProps {
|
||||
params: Promise<{ locale: string }>;
|
||||
}
|
||||
|
||||
export default function Home({ params }: PageProps) {
|
||||
const { locale: _locale } = use(params);
|
||||
const t = useTranslations('Home');
|
||||
|
||||
const fadeInUp = {
|
||||
|
||||
Reference in New Issue
Block a user