9 Commits

Author SHA1 Message Date
cf88db674c Update src/middleware.ts 2026-06-09 18:19:06 +00:00
012cbee2ab Update src/i18n.ts 2026-06-09 18:19:05 +00:00
23e14db1db Update src/middleware.ts 2026-06-09 18:18:24 +00:00
cf045f2fe3 Update src/i18n.ts 2026-06-09 18:18:23 +00:00
4f81d84966 Update src/middleware.ts 2026-06-09 18:17:36 +00:00
4d96ffda9f Update src/i18n.ts 2026-06-09 18:17:35 +00:00
f6f4a060cc Add src/middleware.ts 2026-06-09 18:14:06 +00:00
1e2b792f1b Add src/i18n.ts 2026-06-09 18:14:05 +00:00
6fb7e95ae6 Update src/app/page.tsx 2026-06-09 18:14:05 +00:00
3 changed files with 66 additions and 26 deletions

View File

@@ -12,6 +12,9 @@ import TestimonialCardSixteen from '@/components/sections/testimonial/Testimonia
import { Award, Briefcase, Calendar, Cog, Home, Hammer, MessageCircle, Paintbrush, Sparkles, Star, Brush, ClipboardCheck } from "lucide-react"; import { Award, Briefcase, Calendar, Cog, Home, Hammer, MessageCircle, Paintbrush, Sparkles, Star, Brush, ClipboardCheck } from "lucide-react";
export default function LandingPage() { export default function LandingPage() {
// Placeholder for a translation function. In a real app, this would be imported from an i18n library.
const t = (key: string) => key;
return ( return (
<ThemeProvider <ThemeProvider
defaultButtonVariant="directional-hover" defaultButtonVariant="directional-hover"
@@ -188,14 +191,14 @@ export default function LandingPage() {
testimonials={[]} testimonials={[]}
kpiItems={[ kpiItems={[
{ {
value: "5.0", label: "Average Rating"}, value: "5.0", label: t('home_testimonials.kpi_average_rating')},
{ {
value: "98%", label: "Client Retention"}, value: "98%", label: t('home_testimonials.kpi_client_retention')},
{ {
value: "100%", label: "Satisfaction"}, value: "100%", label: t('home_testimonials.kpi_satisfaction')},
]} ]}
title="What Our Family of Customers Says" title={t('home_testimonials.title')}
description="Hearing from our satisfied clients is the greatest reward. Their trust in our craftsmanship and personal approach is the foundation of our business." description={t('home_testimonials.description')}
/> />
</div> </div>
@@ -203,9 +206,15 @@ export default function LandingPage() {
<SocialProofOne <SocialProofOne
textboxLayout="default" textboxLayout="default"
useInvertedBackground={false} useInvertedBackground={false}
names={[]} names={[
title="" t('social_proof.client_a'),
description="" t('social_proof.client_b'),
t('social_proof.client_c'),
t('social_proof.client_d'),
t('social_proof.client_e'),
]}
title={t('social_proof.title')}
description={t('social_proof.description')}
speed={40} speed={40}
/> />
</div> </div>
@@ -214,49 +223,49 @@ export default function LandingPage() {
<FooterBase <FooterBase
columns={[ columns={[
{ {
title: "Navigation", items: [ title: t('footer.navigation_title'), items: [
{ {
label: "Home", href: "/"}, label: t('footer.home_label'), href: "/"},
{ {
label: "Services", href: "/services"}, label: t('footer.services_label'), href: "/services"},
{ {
label: "Gallery", href: "/gallery"}, label: t('footer.gallery_label'), href: "/gallery"},
{ {
label: "Contact", href: "/contact"}, label: t('footer.contact_label'), href: "/contact"},
], ],
}, },
{ {
title: "Services", items: [ title: t('footer.services_column_title'), items: [
{ {
label: "Hardwood Installation", href: "/services#hardwood-installation"}, label: t('footer.service_hardwood_installation'), href: "/services#hardwood-installation"},
{ {
label: "Floor Sanding", href: "/services#floor-sanding"}, label: t('footer.service_floor_sanding'), href: "/services#floor-sanding"},
{ {
label: "Free Estimates", href: "/services#free-estimates"}, label: t('footer.service_free_estimates'), href: "/services#free-estimates"},
{ {
label: "Custom Designs", href: "/services#custom-designs"}, label: t('footer.service_custom_designs'), href: "/services#custom-designs"},
], ],
}, },
{ {
title: "About Us", items: [ title: t('footer.about_us_title'), items: [
{ {
label: "Our Story", href: "/#about"}, label: t('footer.about_our_story'), href: "/#about"},
{ {
label: "Testimonials", href: "/#home-testimonials"}, label: t('footer.about_testimonials'), href: "/#home-testimonials"},
{ {
label: "Service Areas", href: "/services#service-areas"}, label: t('footer.about_service_areas'), href: "/services#service-areas"},
{ {
label: "FAQs", href: "/contact#faq"}, label: t('footer.about_faqs'), href: "/contact#faq"},
], ],
}, },
]} ]}
logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EsInlEOoSiMI8mFEzeygc6zaoo/uploaded-1780963238289-ovhlz3j6.png" logoSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EsInlEOoSiMI8mFEzeygc6zaoo/uploaded-1780963238289-ovhlz3j6.png"
logoAlt="FloorCraft Logo" logoAlt="FloorCraft Logo"
logoText="FloorCraft" logoText={t('footer.logo_text')}
copyrightText="© 2024 FloorCraft. All rights reserved." copyrightText={t('footer.copyright_text')}
/> />
</div> </div>
</ReactLenis> </ReactLenis>
</ThemeProvider> </ThemeProvider>
); );
} }

13
src/i18n.ts Normal file
View File

@@ -0,0 +1,13 @@
// @ts-expect-error next-intl server config type mismatch
import { getRequestConfig } from 'next-intl/server';
import { notFound } from 'next/navigation';
export const locales = ['en', 'es'];
export default getRequestConfig(async ({ locale }) => {
if (!locales.includes(locale as any)) notFound();
return {
messages: (await import(`../messages/${locale}.json`)).default,
};
});

18
src/middleware.ts Normal file
View File

@@ -0,0 +1,18 @@
// @ts-expect-error next-intl middleware type incompatibility
import createMiddleware from 'next-intl/middleware';
import { locales } from './i18n';
export default createMiddleware({
locales,
defaultLocale: 'en',
localePrefix: 'as-needed',
});
export const config = {
matcher: [
'/',
'/(es|en)/:path*',
// Enable a redirect to a matching locale at the root
// '/((?!_next|_vercel|.*\..*).*)',
],
};