diff --git a/src/components/landing-page.tsx b/src/components/landing-page.tsx index ebfb23e..37a16ca 100644 --- a/src/components/landing-page.tsx +++ b/src/components/landing-page.tsx @@ -7,6 +7,7 @@ import dynamic from 'next/dynamic'; import { jgs7, oxanium } from '@/fonts'; import { Lang } from '@/i18n/locales'; import { Translations } from "@/i18n/translations"; +import { getWikiUrl, getCfpScheduleUrl, getEmailUrl } from '@/lib/external-links'; import { cn } from "@/lib/utils"; import Link from 'next/link'; import { ReactElement, useEffect, useRef } from "react"; @@ -174,7 +175,7 @@ export default function LandingPage( return (
- +
@@ -190,7 +191,7 @@ export default function LandingPage(
@@ -312,7 +313,7 @@ export default function LandingPage(
{t.faq.accesibility.title} -

{t.faq.accesibility.description} {t.contact.email}

+

{t.faq.accesibility.description} {t.contact.email}

{t.faq.food.title} @@ -329,7 +330,7 @@ export default function LandingPage(

📜 {t.faq.documents.privacyPolicy}

- 📚 {t.faq.documents.wiki}

+ 📚 {t.faq.documents.wiki}

@@ -342,7 +343,7 @@ export default function LandingPage(

{t.contact.details.line1}


-

📬 {t.contact.email} {t.contact.details.line2}

+

📬 {t.contact.email} {t.contact.details.line2}


{t.contact.details.line3}


diff --git a/src/components/nav.tsx b/src/components/nav.tsx index 8620260..db1abad 100644 --- a/src/components/nav.tsx +++ b/src/components/nav.tsx @@ -1,5 +1,7 @@ "use client" import { type translations } from "@/i18n/translations" +import { Lang } from '@/i18n/locales' +import { getWikiUrl } from '@/lib/external-links' import { cn } from "@/lib/utils" import ScrollSpy from 'react-scrollspy-navigation' import { MobileNav } from "./mobile-nav" @@ -15,15 +17,16 @@ const linksOrder: Array = [ 'contact' ] -const externalLinks: Record = { - 'wiki': 'https://wiki.cebula.camp/pl/home' -} - export function MainpageNav({ t, + currentLocale = 'pl' as Lang }: { t: typeof translations.pl + currentLocale?: Lang }) { + const externalLinks: Record = { + 'wiki': getWikiUrl(currentLocale) + } return ( diff --git a/src/lib/external-links.ts b/src/lib/external-links.ts new file mode 100644 index 0000000..91be98c --- /dev/null +++ b/src/lib/external-links.ts @@ -0,0 +1,35 @@ +import { Lang } from '@/i18n/locales' + +export const EXTERNAL_URLS = { + email: 'orga@cebula.camp', +} as const + +export function getWikiUrl(locale: Lang): string { + return `https://wiki.cebula.camp/${locale}/home` +} + +export function getCfpScheduleUrl(locale: Lang): string { + return `https://cfp.cebula.camp/camp-2025/locale/set?locale=${locale}&next=/camp-2025/schedule/` +} + +export function getCfpUrl(locale: Lang): string { + return `https://cfp.cebula.camp/camp-2025/cfp` +} + +export function getCfpArtUrl(locale: Lang): string { + return `https://cfp.cebula.camp/camp-2025-art/cfp` +} + +export function getEmailUrl(): string { + return `mailto:${EXTERNAL_URLS.email}` +} + +export function getExternalLinks(locale: Lang) { + return { + wiki: getWikiUrl(locale), + cfpSchedule: getCfpScheduleUrl(locale), + cfp: getCfpUrl(locale), + cfpArt: getCfpArtUrl(locale), + email: getEmailUrl(), + } +} \ No newline at end of file