diff --git a/client/sanity.config.ts b/client/sanity.config.ts index 6f4765e80..1f085072c 100644 --- a/client/sanity.config.ts +++ b/client/sanity.config.ts @@ -43,7 +43,8 @@ export default defineConfig({ ), // Regular document types - S.documentTypeListItem("about-item").title("About Item") + S.documentTypeListItem("about-item").title("About Item"), + S.documentTypeListItem("contact-detail").title("Contact Detail") ]) }), // Vision is a tool that lets you query your content with GROQ in the studio diff --git a/client/sanity/schema.ts b/client/sanity/schema.ts index 916fcbef5..6142c9701 100644 --- a/client/sanity/schema.ts +++ b/client/sanity/schema.ts @@ -1,7 +1,8 @@ import { AboutItemSchema } from "@/models/sanity/AboutItem/Schema" +import { ContactDetailSchema } from "@/models/sanity/ContactDetail/Schema" import { HomePageSchema } from "@/models/sanity/HomePage/Schema" import { type SchemaTypeDefinition } from "sanity" export const schema: { types: SchemaTypeDefinition[] } = { - types: [AboutItemSchema, HomePageSchema] + types: [AboutItemSchema, HomePageSchema, ContactDetailSchema] } diff --git a/client/src/app/contact/page.tsx b/client/src/app/contact/page.tsx new file mode 100644 index 000000000..71722e31f --- /dev/null +++ b/client/src/app/contact/page.tsx @@ -0,0 +1,21 @@ +import Contact from "@/components/composite/Contact/Contact" +import { sanityQuery } from "../../../sanity/lib/utils" +import { + CONTACT_DETAIL_GROQ_QUERY, + ContactDetailItem +} from "@/models/sanity/ContactDetail/Utils" +import { Metadata } from "next" + +export const metadata: Metadata = { + title: "Contact UASC", + description: "Information about how to reach UASC" +} + +const Page = async () => { + const contactDetails = await sanityQuery( + CONTACT_DETAIL_GROQ_QUERY + ) + return +} + +export default Page diff --git a/client/src/components/composite/Contact/Contact.story.tsx b/client/src/components/composite/Contact/Contact.story.tsx new file mode 100644 index 000000000..5d3829659 --- /dev/null +++ b/client/src/components/composite/Contact/Contact.story.tsx @@ -0,0 +1,31 @@ +import type { Meta, StoryObj } from "@storybook/react" +import Contact from "./Contact" + +const meta: Meta = { + component: Contact +} + +export default meta + +type Story = StoryObj + +export const Default: Story = { + args: { + items: [ + { + title: "bookings", + email: "bookings@gmail.com" + }, + { + title: "bookings", + description: "for guest bookings, reservations etc", + email: "bookings@gmail.com" + }, + { + title: "bookings", + description: "for guest bookings, reservations etc", + email: "bookings@gmail.com" + } + ] + } +} diff --git a/client/src/components/composite/Contact/Contact.tsx b/client/src/components/composite/Contact/Contact.tsx new file mode 100644 index 000000000..1814a98fa --- /dev/null +++ b/client/src/components/composite/Contact/Contact.tsx @@ -0,0 +1,23 @@ +import FullPageBackgroundImage from "@/components/generic/FullPageBackgroundImage/FullPageBackgroundImage" +import ContactDetailPanel, { + IContactDetailPanel +} from "./ContactDetailPanel/ContactDetailPanel" +import { Footer } from "@/components/generic/Footer/Footer" + +interface IContact extends IContactDetailPanel {} + +const Contact = ({ items }: IContact) => { + return ( + <> + +
+

Contact Us

+ +
+
+