Skip to content

Commit

Permalink
feat: add navigation cards service catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
hegeaal committed Nov 27, 2023
1 parent dbac96e commit 6a96b5e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
28 changes: 24 additions & 4 deletions apps/service-catalog/app/catalogs/[catalogId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
export default async function CatalogPage() {
import { Card, PageBanner } from '@catalog-frontend/ui';
import { getTranslateText, localization } from '@catalog-frontend/utils';
import styles from './services-page.module.css';
import cn from 'classnames';
import { Organization } from '@catalog-frontend/types';
import { getOrganization } from '@catalog-frontend/data-access';
import { Params } from 'next/dist/shared/lib/router/utils/route-matcher';

export default async function CatalogPage({ params }: Params) {
const { catalogId } = params;
const organization: Organization = await getOrganization(catalogId).then((res) => res.json());
return (
<div>
<h1> Tjenestekatalog - velg mellom offentlig tjeneste og tjeneste</h1>
</div>
<>
<PageBanner
title={localization.catalogType.service}
subtitle={getTranslateText(organization.prefLabel).toString()}
/>
<div className={cn(styles.cardsContainer, 'container')}>
<Card
title={localization.publicServices}
href={`/catalogs/${catalogId}/public-services`}
/>
<Card title={localization.services} />
</div>
</>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.cardsContainer {
display: flex;
gap: 40px;
padding-top: 50px;
padding-bottom: 50px;
}
2 changes: 1 addition & 1 deletion apps/service-catalog/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default async function HomePage() {
return (
<div>
<h1>Service Catalog - velg mellom offentlig tjeneste og tjeneste</h1>
<h1>Her er det ingenting</h1>
</div>
);
}
2 changes: 2 additions & 0 deletions libs/utils/src/lib/language/nb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const nb = {
somethingWentWrong: 'Beklager, noe gikk galt. Prøv på nytt litt senere.',
allCatalogs: 'Alle kataloger',
chooseOrganizaiton: 'Velg virksomhet',
services: 'Tjenester',
publicServices: 'Offentlige tjenester',
catalogType: {
concept: 'Begrepskatalog',
dataset: 'Datasettkatalogen',
Expand Down

0 comments on commit 6a96b5e

Please sign in to comment.