diff --git a/app/[locale]/institute/sections/page.tsx b/app/[locale]/institute/sections/page.tsx index 30320042..53765bfc 100644 --- a/app/[locale]/institute/sections/page.tsx +++ b/app/[locale]/institute/sections/page.tsx @@ -1,9 +1,93 @@ -import { WorkInProgressStatus } from '~/components/status'; +import Link from 'next/link'; +import { Fragment } from 'react'; +import { IconType } from 'react-icons'; +import { BsHddNetworkFill } from 'react-icons/bs'; +import { + MdLibraryBooks, + MdOutlineAccountBalance, + MdOutlineAdminPanelSettings, + MdOutlineElectricalServices, + MdOutlineGroupWork, + MdOutlineHealthAndSafety, + MdOutlineRealEstateAgent, + MdOutlineSecurity, + MdOutlineSportsTennis, + MdOutlineStore, +} from 'react-icons/md'; -export default function Sections({ +import Heading from '~/components/heading'; +import { getTranslations } from '~/i18n/translations'; +import { cn } from '~/lib/utils'; +import { db } from '~/server/db'; + +export default async function Sections({ params: { locale }, }: { params: { locale: string }; }) { - return ; + const text = (await getTranslations(locale)).Sections; + + const sections = await db.query.sections.findMany(); + + const sectionIcons: Record = { + accounts: MdOutlineAccountBalance, + 'central-workshop': MdOutlineGroupWork, + 'centre-of-computing-and-networking': BsHddNetworkFill, + 'electrical-maintenance': MdOutlineElectricalServices, + estate: MdOutlineRealEstateAgent, + 'general-administration': MdOutlineAdminPanelSettings, + 'health-centre': MdOutlineHealthAndSafety, + library: MdLibraryBooks, + security: MdOutlineSecurity, + sports: MdOutlineSportsTennis, + store: MdOutlineStore, + }; + + return ( +
+ + +
    + {sections.map((section, i) => { + const Icon = sectionIcons[section.urlName]; + if (!Icon) return null; + return ( +
  • + + + {section.name.toUpperCase()} + +
  • + ); + })} +
+
+
+ ); } diff --git a/i18n/en.ts b/i18n/en.ts index 2f62dc03..4ab95acf 100644 --- a/i18n/en.ts +++ b/i18n/en.ts @@ -357,6 +357,9 @@ Saturdays & Holidays: 09.00 am to 05.00 pm`, Sports: {}, Store: {}, }, + Sections: { + title: 'Sections', + }, Status: { NoResult: { title: 'No results found', diff --git a/i18n/hi.ts b/i18n/hi.ts index 09f69779..8c97d674 100644 --- a/i18n/hi.ts +++ b/i18n/hi.ts @@ -353,6 +353,9 @@ const text: Translations = { Sports: {}, Store: {}, }, + Sections: { + title: 'प्रशासनिक और अवसंरचना सेवाएँ', + }, Status: { NoResult: { title: 'कोई परिणाम नहीं मिला', diff --git a/i18n/translations.ts b/i18n/translations.ts index 4286197f..aa7d705a 100644 --- a/i18n/translations.ts +++ b/i18n/translations.ts @@ -318,6 +318,9 @@ export interface Translations { Sports: {}; Store: {}; }; + Sections: { + title: string; + }; Status: { NoResult: { title: string; description: string }; Unauthorised: { title: string; description: string };