Skip to content

Commit

Permalink
Link to min side from page
Browse files Browse the repository at this point in the history
  • Loading branch information
AudunSorheim committed Nov 14, 2023
1 parent 3b1a953 commit a0e18f7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
4 changes: 0 additions & 4 deletions src/components/AktivitetskravInfoComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ export const AktivitetskravInfoComponent = () => {
<AktivitetskravInfo
harArbeidsgiver={visning === "MED_ARBEIDSGIVER"}
/>

<Link className="flex self-center" href={process.env.NEXT_PUBLIC_MIN_SIDE_URL}>
Naviger til Min side
</Link>
</Page>
)
}
45 changes: 27 additions & 18 deletions src/components/page/Page.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
import React, { ReactNode } from "react"
import { PageHeadingWithImage } from "./PageHeadingWithImage"
import { PageHeading } from "./PageHeading"
import React, { ReactNode } from "react";
import { PageHeadingWithImage } from "./PageHeadingWithImage";
import { PageHeading } from "./PageHeading";
import { MedUtenAGVisning } from "@/components/AktivitetskravInfoComponent";
import { Link } from "@navikt/ds-react";

interface Props {
headerText: ReactNode
image?: MedUtenAGVisning
children: ReactNode
headerText: ReactNode;
image?: MedUtenAGVisning;
children: ReactNode;
}

export const Page = ({ headerText, image, children }: Props) => {
return (
<div className="mb-8">
{image ? (
<PageHeadingWithImage headerText={headerText} image={image} />
) : (
<PageHeading headerText={headerText} />
)}
return (
<div className="mb-8">
{image ? (
<PageHeadingWithImage headerText={headerText} image={image} />
) : (
<PageHeading headerText={headerText} />
)}

<div className="flex flex-col items-center p-8">
<div className="flex flex-col max-w-4xl gap-8">{children}</div>
</div>
<div className="flex flex-col items-center p-8">
<div className="flex flex-col max-w-3xl gap-8">
{children}
<Link
className="flex self-center"
href={process.env.NEXT_PUBLIC_MIN_SIDE_URL}
>
Naviger til Min side
</Link>
</div>
)
}
</div>
</div>
);
};
7 changes: 0 additions & 7 deletions src/components/skeleton/AktivitetskravSkeletonComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ export const AktivitetskravSkeletonComponent = () => {
return (
<Page headerText={<Skeleton>Informasjon om aktivitetsplikt</Skeleton>}>
<AktivitetskravInfo harArbeidsgiver={true} displaySkeleton={true} />

<Link
className="flex self-center"
href={process.env.NEXT_PUBLIC_MIN_SIDE_URL}
>
Naviger til Min side
</Link>
</Page>
);
};

0 comments on commit a0e18f7

Please sign in to comment.