diff --git a/bun.lockb b/bun.lockb index b2e2a0e..ad31944 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/sanity/schema.ts b/sanity/schema.ts index a8a69a9..d94fb48 100644 --- a/sanity/schema.ts +++ b/sanity/schema.ts @@ -22,7 +22,8 @@ import profile from './schemaTypes/profile' import organisation from './schemaTypes/organisation' import career from './schemaTypes/career' import role from './schemaTypes/role' +import trustee from './schemaTypes/trustee' export const schema: { types: SchemaTypeDefinition[] } = { - types: [localeString,contact,localeText,localeBlockArray,role,location,gallery,event,ayurvedicCenter,career,features,vriddhashrama, doctor,Home,fqa,facility,testimonial,section,aboutus,row,pricing,organisation,profile], + types: [localeString,contact,localeText,localeBlockArray,role,location,gallery,event,ayurvedicCenter,career,features,vriddhashrama, doctor,Home,fqa,facility,testimonial,section,aboutus,row,pricing,organisation,profile,trustee], } diff --git a/sanity/schemaTypes/organisation.ts b/sanity/schemaTypes/organisation.ts index 184d36c..b0de425 100644 --- a/sanity/schemaTypes/organisation.ts +++ b/sanity/schemaTypes/organisation.ts @@ -7,6 +7,19 @@ export default defineType({ type: 'document', icon:UsersIcon, fields: [ + defineField({ + name: 'trustees', + title: 'Trustees', + type: 'array', + validation: (Rule) => Rule.required(), + of: [ + defineField({ + name: "trustee", + title: "Trustee", + type: "trustee" + }) + ] + }), defineField({ name: 'members', title: 'Members', diff --git a/sanity/schemaTypes/trustee.ts b/sanity/schemaTypes/trustee.ts new file mode 100644 index 0000000..704e171 --- /dev/null +++ b/sanity/schemaTypes/trustee.ts @@ -0,0 +1,43 @@ +import { defineField, defineType } from 'sanity' +import { baseLanguage } from './locale' + +export default defineType({ + name: 'trustee', + title: 'Trustee', + type: 'object', + fields: [ + defineField({ + name: 'name', + title: 'Name', + type: 'localeString', + validation: (Rule) => Rule.required(), + }), + defineField({ + name: 'image', + title: 'Image', + type: 'image', + validation: (Rule) => Rule.required(), + options: { + hotspot: true, + } + }), + defineField({ + name: 'position', + title: 'Position', + type: 'localeString', + validation: (Rule) => Rule.required(), + }), + defineField({ + name: 'description', + title: 'Description', + type: 'localeText', + validation: (Rule) => Rule.required(), + }), + ], + preview: { + select: { + title: `name.${baseLanguage!.id}`, + media: 'image', + }, + }, +}) \ No newline at end of file diff --git a/src/app/(main)/[locale]/about-us/organisation/page.tsx b/src/app/(main)/[locale]/about-us/organisation/page.tsx index a0db31a..d723dea 100644 --- a/src/app/(main)/[locale]/about-us/organisation/page.tsx +++ b/src/app/(main)/[locale]/about-us/organisation/page.tsx @@ -4,11 +4,13 @@ import Heading from "~/components/Heading/Heading"; import ScrollDown from "~/components/Hero/ScrollDown"; import Profile from "~/components/Profile/Profile"; import { fetchOrganisationPage } from "~/lib/queries"; +import Reveal from "~/components/Animations/reveal"; export default async function organisor() { const t = await getTranslations("organisation"); const locale = await getLocale(); const data = await fetchOrganisationPage(locale); + console.log(data); return (
{t("trusteeDescription")}
-