diff --git a/apps/data-norge/src/app/[lang]/view/api/page.tsx b/apps/data-norge/src/app/[lang]/view/api/page.tsx index 21e0f62b..596aa3e1 100644 --- a/apps/data-norge/src/app/[lang]/view/api/page.tsx +++ b/apps/data-norge/src/app/[lang]/view/api/page.tsx @@ -3,7 +3,8 @@ import { i18n, getDictionary } from '@fdk-frontend/dictionaries'; import DetailsPage from '../../../components/details/details-page/api'; import { DetailsPageWrapperProps } from '../page'; -const APIPageWrapper = async ({ params }: DetailsPageWrapperProps) => { +const APIPageWrapper = async (props: DetailsPageWrapperProps) => { + const params = await props.params; const locale = params.lang ?? i18n.defaultLocale; const commonDictionary = await getDictionary(locale, 'common'); diff --git a/apps/data-norge/src/app/[lang]/view/begrep/page.tsx b/apps/data-norge/src/app/[lang]/view/begrep/page.tsx index 7b7f3df8..cbf04061 100644 --- a/apps/data-norge/src/app/[lang]/view/begrep/page.tsx +++ b/apps/data-norge/src/app/[lang]/view/begrep/page.tsx @@ -3,7 +3,8 @@ import { i18n, getDictionary } from '@fdk-frontend/dictionaries'; import DetailsPage from '../../../components/details/details-page/begrep'; import { DetailsPageWrapperProps } from '../page'; -const BegrepsPageWrapper = async ({ params }: DetailsPageWrapperProps) => { +const BegrepsPageWrapper = async (props: DetailsPageWrapperProps) => { + const params = await props.params; const locale = params.lang ?? i18n.defaultLocale; const commonDictionary = await getDictionary(locale, 'common'); diff --git a/apps/data-norge/src/app/[lang]/view/datasett-worstcase/page.tsx b/apps/data-norge/src/app/[lang]/view/datasett-worstcase/page.tsx index 99c2dbae..1306e593 100644 --- a/apps/data-norge/src/app/[lang]/view/datasett-worstcase/page.tsx +++ b/apps/data-norge/src/app/[lang]/view/datasett-worstcase/page.tsx @@ -3,7 +3,8 @@ import { i18n, getDictionary } from '@fdk-frontend/dictionaries'; import DetailsPage from '../../../components/details/details-page/datasett-worstcase'; import { DetailsPageWrapperProps } from '../page'; -const DatasettRichPageWrapper = async ({ params }: DetailsPageWrapperProps) => { +const DatasettRichPageWrapper = async (props: DetailsPageWrapperProps) => { + const params = await props.params; const locale = params.lang ?? i18n.defaultLocale; const commonDictionary = await getDictionary(locale, 'common'); diff --git a/apps/data-norge/src/app/[lang]/view/layout.tsx b/apps/data-norge/src/app/[lang]/view/layout.tsx index f6a865d7..df188c14 100644 --- a/apps/data-norge/src/app/[lang]/view/layout.tsx +++ b/apps/data-norge/src/app/[lang]/view/layout.tsx @@ -1,4 +1,6 @@ -import DocsLayout, { generateStaticParams } from '@fdk-frontend/ui/layouts/docs-layout'; +import DocsLayout from '@fdk-frontend/ui/layouts/docs-layout'; + +export const revalidate = 0; +export const dynamic = 'force-dynamic'; export default DocsLayout; -export { generateStaticParams }; diff --git a/apps/data-norge/src/app/[lang]/view/page.tsx b/apps/data-norge/src/app/[lang]/view/page.tsx index a6ec5666..206bca3b 100644 --- a/apps/data-norge/src/app/[lang]/view/page.tsx +++ b/apps/data-norge/src/app/[lang]/view/page.tsx @@ -3,13 +3,14 @@ import { i18n, getDictionary, type LocaleCodes } from '@fdk-frontend/dictionarie import DetailsPage from '../../components/details/details-page'; export type DetailsPageWrapperProps = { - params: { + params: Promise<{ lang: LocaleCodes; slug: string[]; - }; + }>; }; -const DetailsPageWrapper = async ({ params }: DetailsPageWrapperProps) => { +const DetailsPageWrapper = async (props: DetailsPageWrapperProps) => { + const params = await props.params; const locale = params.lang ?? i18n.defaultLocale; const commonDictionary = await getDictionary(locale, 'common'); diff --git a/apps/data-norge/src/app/components/details/community-tab/index.tsx b/apps/data-norge/src/app/components/details/community-tab/index.tsx index 679051e4..0f7e7d26 100644 --- a/apps/data-norge/src/app/components/details/community-tab/index.tsx +++ b/apps/data-norge/src/app/components/details/community-tab/index.tsx @@ -1,4 +1,5 @@ import { PropsWithChildren } from 'react'; +import NextLink from 'next/link'; import { Heading, Button, Link, Paragraph, Alert } from '@digdir/designsystemet-react'; import { ExternalLinkIcon } from '@navikt/aksel-icons'; @@ -104,10 +105,10 @@ const CommunityTab = ({ children }: PropsWithChildren) => { diff --git a/apps/data-norge/src/app/components/details/details-page/api/index.tsx b/apps/data-norge/src/app/components/details/details-page/api/index.tsx index 559581e3..609345c9 100644 --- a/apps/data-norge/src/app/components/details/details-page/api/index.tsx +++ b/apps/data-norge/src/app/components/details/details-page/api/index.tsx @@ -41,8 +41,8 @@ export default function DetailsPage({ locale, commonDictionary }: DetailsPageTyp const breadcrumbList = [ { - href: '#', - text: 'Datasett', + href: '/data-services', + text: 'API-er', }, { href: '#', diff --git a/apps/data-norge/src/app/components/details/details-page/begrep/index.tsx b/apps/data-norge/src/app/components/details/details-page/begrep/index.tsx index bd21ba26..4ea39d25 100644 --- a/apps/data-norge/src/app/components/details/details-page/begrep/index.tsx +++ b/apps/data-norge/src/app/components/details/details-page/begrep/index.tsx @@ -29,8 +29,8 @@ export type DetailsPageType = { export default function DetailsPage({ locale, commonDictionary }: DetailsPageType) { const breadcrumbList = [ { - href: '#', - text: 'Datasett', + href: '/concepts', + text: 'Begreper', }, { href: '#', diff --git a/apps/data-norge/src/app/components/details/details-page/datasett-worstcase/index.tsx b/apps/data-norge/src/app/components/details/details-page/datasett-worstcase/index.tsx index 95a9a1e9..324cc79b 100644 --- a/apps/data-norge/src/app/components/details/details-page/datasett-worstcase/index.tsx +++ b/apps/data-norge/src/app/components/details/details-page/datasett-worstcase/index.tsx @@ -48,7 +48,7 @@ export default function DetailsPage({ locale, commonDictionary }: DetailsPageTyp const breadcrumbList = [ { - href: '#', + href: '/datasets', text: 'Datasett', }, { diff --git a/apps/data-norge/src/app/components/details/details-page/index.tsx b/apps/data-norge/src/app/components/details/details-page/index.tsx index 7912c317..210bba16 100644 --- a/apps/data-norge/src/app/components/details/details-page/index.tsx +++ b/apps/data-norge/src/app/components/details/details-page/index.tsx @@ -49,7 +49,7 @@ export default function DetailsPage({ locale, commonDictionary }: DetailsPageTyp const breadcrumbList = [ { - href: '#', + href: '/datasets', text: 'Datasett', }, { @@ -291,29 +291,6 @@ For datasettene *Vannforsyningssystem*, *Transportsystem*, og *Inntakspunkt* er - {/**/} @@ -323,45 +300,6 @@ For datasettene *Vannforsyningssystem*, *Transportsystem*, og *Inntakspunkt* er apis={apis} className={cn({ [styles.highlight]: highlight })} /> - {/* -
- - Relaterte APIer - - - - - - - - - - - - - - -
- Transportsystem API - - - Mattilsynet - - - -
- Trafikkdata 2024 - - - Vegvesenet - - - -
-
*/}
diff --git a/libs/ui/src/lib/language-switcher/index.tsx b/libs/ui/src/lib/language-switcher/index.tsx index 770e2a30..a70555e6 100644 --- a/libs/ui/src/lib/language-switcher/index.tsx +++ b/libs/ui/src/lib/language-switcher/index.tsx @@ -31,7 +31,6 @@ const LanguageSwitcher = ({ inverted }: LanguageSwitcherProps) => { defaultValue={defaultCode} size='sm' onChange={(code) => onLanguageSelect(code as LocaleCodes)} - name='Select language' > {i18n.locales.map((locale) => (