timeslots API

This commit is contained in:
Asya Vee
2025-08-26 23:36:24 +04:00
parent 47baf8dfe2
commit c0647fe512
47 changed files with 830 additions and 776 deletions

View File

@@ -0,0 +1,40 @@
import type { Metadata } from "next";
import localFont from "next/font/local";
import {NextIntlClientProvider} from 'next-intl';
import {getMessages} from 'next-intl/server';
import "../globals.css";
const geistSans = localFont({
src: "../fonts/GeistVF.woff",
variable: "--font-geist-sans",
});
const geistMono = localFont({
src: "../fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
});
export const metadata: Metadata = {
title: "Vitrify - Book Your Pottery Session",
description: "Book pottery sessions and workshops",
};
export default async function LocaleLayout({
children,
params
}: {
children: React.ReactNode;
params: Promise<{locale: string}>;
}) {
const {locale} = await params;
const messages = await getMessages();
return (
<html lang={locale || 'en'}>
<body className={`${geistSans.variable} ${geistMono.variable}`}>
<NextIntlClientProvider messages={messages}>
{children}
</NextIntlClientProvider>
</body>
</html>
);
}

View File

@@ -0,0 +1,27 @@
import BookingInterface from "../../components/BookingForm";
import {getTranslations} from 'next-intl/server';
import LanguageSwitcher from "../../components/LanguageSwitcher";
export default async function Home() {
const t = await getTranslations('footer');
return (
<div>
<main>
<LanguageSwitcher />
<BookingInterface />
</main>
<footer className="bg-white text-black py-8 mt-12 border-t">
<div className="max-w-2xl mx-auto px-4 text-center">
<p className="text-gray-600 mb-2">{t('getInTouch')}</p>
<a
href="mailto:vitrify@asyavee.me"
className="text-blue-600 hover:text-blue-800 transition-colors font-medium"
>
vitrify@asyavee.me
</a>
</div>
</footer>
</div>
);
}

View File

@@ -12,17 +12,17 @@ const geistMono = localFont({
});
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "Vitrify - Book Your Pottery Session",
description: "Book pottery sessions and workshops",
};
export default function RootLayout({
children,
}: Readonly<{
}: {
children: React.ReactNode;
}>) {
}) {
return (
<html lang="en">
<html>
<body className={`${geistSans.variable} ${geistMono.variable}`}>
{children}
</body>

View File

@@ -1,22 +1,5 @@
import BookingInterface from "../components/BookingForm";
import {redirect} from 'next/navigation';
export default function Home() {
return (
<div>
<main>
<BookingInterface />
</main>
<footer className="bg-white text-black py-8 mt-12">
<div className="max-w-2xl mx-auto px-4 text-center">
<p className="text-gray-600 mb-2">Get in touch</p>
<a
href="mailto:vitrify@asyavee.me"
className="text-blue-600 hover:text-blue-800 transition-colors font-medium"
>
vitrify@asyavee.me
</a>
</div>
</footer>
</div>
);
}
export default function RootPage() {
redirect('/en');
}