diff --git a/messages/en.json b/messages/en.json index 62e259c..2107432 100644 --- a/messages/en.json +++ b/messages/en.json @@ -132,5 +132,17 @@ "returnByDescription": "Select how long you would like to borrow the item for.", "submit": "Submit" } + }, + "events": { + "title": "Events", + "activeEvents": "Active events", + "upcomingEvents": "Upcoming events", + "pastEvents": "Past events", + "detailsAboutEvent": "Read more about {eventName}", + "startsAt": "Starts at", + "startedAt": "Started at", + "endsAt": "Ends at", + "endedAt": "Ended at", + "backToEvents": "Back to Events" } } diff --git a/messages/no.json b/messages/no.json index 0c5810a..68a9d42 100644 --- a/messages/no.json +++ b/messages/no.json @@ -132,5 +132,17 @@ "returnByDescription": "Velg hvor lenge du ønsker å låne gjenstanden(e)", "submit": "Send" } + }, + "events": { + "title": "Arrangementer", + "activeEvents": "Pågående arrangementer", + "upcomingEvents": "Kommende arrangementer", + "pastEvents": "Tidligere arrangementer", + "detailsAboutEvent": "Les mer om {eventName}", + "startsAt": "Starter kl.", + "startedAt": "Startet kl.", + "endsAt": "Slutter kl.", + "endedAt": "Sluttet kl.", + "backToEvents": "Tilbake til arrangementer" } } diff --git a/src/app/[locale]/(default)/events/[id]/layout.tsx b/src/app/[locale]/(default)/events/[id]/layout.tsx index 332cc70..7009a20 100644 --- a/src/app/[locale]/(default)/events/[id]/layout.tsx +++ b/src/app/[locale]/(default)/events/[id]/layout.tsx @@ -1,10 +1,12 @@ import { Button } from '@/components/ui/Button'; import { ArrowLeftIcon } from 'lucide-react'; +import { getTranslations } from 'next-intl/server'; import Link from 'next/link'; -export default function EventDetailsLayout({ +export default async function EventDetailsLayout({ children, }: { children: React.ReactNode }) { + const t = await getTranslations('events'); return ( <> @@ -14,7 +16,7 @@ export default function EventDetailsLayout({ aria-label='Back to Events' >