Skip to content

Commit

Permalink
Merge pull request #350 from navikt/dependabot/npm_and_yarn/navikt/na…
Browse files Browse the repository at this point in the history
…v-dekoratoren-moduler-3.1.0

Bump @navikt/nav-dekoratoren-moduler from 2.1.6 to 3.1.0
  • Loading branch information
magnurh-cx authored Oct 8, 2024
2 parents 9aa7a34 + a9f7ca0 commit 130ed95
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 83 deletions.
86 changes: 8 additions & 78 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@navikt/aksel-icons": "^7.1.2",
"@navikt/ds-css": "^7.1.2",
"@navikt/ds-react": "^7.1.2",
"@navikt/nav-dekoratoren-moduler": "^2.1.6",
"@navikt/nav-dekoratoren-moduler": "^3.1.0",
"@sentry/nextjs": "^8.33.1",
"axios": "^1.7.7",
"html-react-parser": "^5.1.17",
Expand Down
8 changes: 4 additions & 4 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { DecoratorComponents, fetchDecoratorReact } from '@navikt/nav-dekoratoren-moduler/ssr';
import { DecoratorComponentsReact, fetchDecoratorReact } from '@navikt/nav-dekoratoren-moduler/ssr';
import getConfig from 'next/config';
import Document, { DocumentContext, Head, Html, Main, NextScript } from 'next/document';
import { ServerStyleSheet } from 'styled-components';

const { publicRuntimeConfig } = getConfig();

interface Props {
Decorator: DecoratorComponents;
Decorator: DecoratorComponentsReact;
}
export default class MyDocument extends Document<Props> {
static async getInitialProps(ctx: DocumentContext) {
Expand Down Expand Up @@ -45,12 +45,12 @@ export default class MyDocument extends Document<Props> {
}
}
render() {
const { Styles, Scripts, Header, Footer } = this.props.Decorator;
const { HeadAssets, Scripts, Header, Footer } = this.props.Decorator;

const disableDecorator = process.env.DECORATOR_DISABLED !== 'true';
return (
<Html style={{ scrollBehavior: 'smooth' }}>
<Head>{disableDecorator && <Styles />}</Head>
<Head>{disableDecorator && <HeadAssets />}</Head>
<body>
{disableDecorator && <Header />}
<Main />
Expand Down

0 comments on commit 130ed95

Please sign in to comment.