Skip to content

Commit

Permalink
🏷️ simplified innholdstype
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh committed Dec 9, 2023
1 parent 02042b8 commit b9755a5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
23 changes: 11 additions & 12 deletions aksel.nav.no/website/components/layout/god-praksis-page/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ export type GpTemaT = {
undertema: { title: string; description: string }[];
};

export type GpInnholdstypeT = {
title: string;
description?: string;
hasRefs: boolean;
};

export type HeroNavT = {
heroNav: {
title: string;
Expand All @@ -23,14 +29,6 @@ export type HeroNavT = {
}[];
};

export type GpInnholdstypeT = {
innholdstype: {
title: string;
description?: string;
hasRefs: boolean;
}[];
};

export type GpChipsInnholdstypeRawT = {
chipsInnholdstype: {
title: string;
Expand Down Expand Up @@ -78,8 +76,9 @@ export type GpGroupedArticlesInputT = {
}[];
};

export type GpEntryPageProps = HeroNavT &
GpInnholdstypeT & { articles: GpArticleT[] } & {
tema: GpTemaT | null;
} & GpChipsInnholdstypeT &
export type GpEntryPageProps = HeroNavT & {
innholdstype: GpInnholdstypeT[];
} & { articles: GpArticleT[] } & {
tema: GpTemaT | null;
} & GpChipsInnholdstypeT &
GpChipsUndertemaT & { initialArticles: GpGroupedArticlesT };
8 changes: 5 additions & 3 deletions aksel.nav.no/website/pages/gp/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ export const getStaticProps: GetStaticProps = async ({
chipsUndertema,
initialInnholdstype,
initialUndertema,
}: HeroNavT & { tema: GpTemaT | null } & GpInnholdstypeT & {
articles: GpArticleT[];
} & GpChipsInnholdstypeRawT &
}: HeroNavT & { tema: GpTemaT | null } & {
innholdstype: GpInnholdstypeT[];
} & {
articles: GpArticleT[];
} & GpChipsInnholdstypeRawT &
GpChipsUndertemaRawT &
GpGroupedArticlesInputT = await getClient().fetch(query, {
slug,
Expand Down
6 changes: 3 additions & 3 deletions aksel.nav.no/website/pages/gp/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ export const getStaticProps: GetStaticProps = async ({
innholdstype,
chipsInnholdstype,
initialInnholdstype,
}: { articles: GpArticleT[] } & HeroNavT &
GpInnholdstypeT &
GpChipsInnholdstypeRawT & {
}: { articles: GpArticleT[] } & HeroNavT & {
innholdstype: GpInnholdstypeT[];
} & GpChipsInnholdstypeRawT & {
initialInnholdstype: GpGroupedArticlesInputT["initialInnholdstype"];
} = await getClient().fetch(query);

Expand Down

0 comments on commit b9755a5

Please sign in to comment.