Skip to content

Commit d7d0ffe

Browse files
committed
Merge branch 'contact-step-page' into contact-step-page-external-links
2 parents 7034998 + 7e30467 commit d7d0ffe

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

packages/nextjs/src/components/_common/headers/contactPageHeader/ContactPageHeader.module.scss packages/nextjs/src/components/_common/headers/headerWithParent/HeaderWithParent.module.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.contactPageHeader {
1+
.headerContainer {
22
display: flex;
33
flex-direction: column;
44
justify-content: center;

packages/nextjs/src/components/_common/headers/contactPageHeader/ContactPageHeader.tsx packages/nextjs/src/components/_common/headers/headerWithParent/HeaderWithParent.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { BodyShort, Heading } from '@navikt/ds-react';
22
import { ProductDataMixin } from 'types/component-props/_mixins';
33
import { ContentProps } from 'types/content-props/_content-common';
44
import { classNames } from 'utils/classnames';
5-
import style from './ContactPageHeader.module.scss';
5+
import style from './HeaderWithParent.module.scss';
66

77
type Props = {
88
contentProps: Pick<ContentProps, 'data'> & {
@@ -12,11 +12,11 @@ type Props = {
1212
className?: string;
1313
};
1414

15-
export const ContactPageHeader = ({ contentProps, textAboveTitle, className }: Props) => {
15+
export const HeaderWithParent = ({ contentProps, textAboveTitle, className }: Props) => {
1616
const { data } = contentProps;
1717

1818
return (
19-
<div className={classNames(style.contactPageHeader, className)}>
19+
<div className={classNames(style.headerContainer, className)}>
2020
<BodyShort textColor="subtle" className={style.textAboveTitle}>
2121
{textAboveTitle}
2222
</BodyShort>

packages/nextjs/src/components/_common/metatags/HeadWithMetatags.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ const getDescription = (content: ContentProps) => {
2323
return description.slice(0, DESCRIPTION_MAX_LENGTH);
2424
};
2525

26-
const contentTypesWithNoIndex = new Set([ContentType.Error, ContentType.FormIntermediateStepPage]);
26+
const contentTypesWithNoIndex = new Set([
27+
ContentType.Error,
28+
ContentType.FormIntermediateStepPage,
29+
ContentType.ContactStepPage,
30+
]);
2731

2832
const isNoIndex = (content: ContentProps) =>
2933
content.isPagePreview || contentTypesWithNoIndex.has(content.type) || content.data?.noindex;

packages/nextjs/src/components/pages/contact-step-page/ContactStepPage.tsx

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { BodyShort, Heading, LinkPanel } from '@navikt/ds-react';
2-
import { ContactPageHeader } from 'components/_common/headers/contactPageHeader/ContactPageHeader';
2+
import { HeaderWithParent } from 'components/_common/headers/headerWithParent/HeaderWithParent';
33
import { ParsedHtml } from 'components/_common/parsedHtml/ParsedHtml';
44
import { ContentType, ContentCommonProps } from 'types/content-props/_content-common';
55
import { IllustrationStatic } from 'components/_common/illustration/static/IllustrationStatic';
@@ -23,8 +23,7 @@ export type ContactStepPageProps = ContentCommonProps & {
2323
};
2424
};
2525

26-
export const ContactStepPage = (props: ContactStepPageProps) => {
27-
const { data } = props;
26+
export const ContactStepPage = ({ data }: ContactStepPageProps) => {
2827
const {
2928
title,
3029
illustration,
@@ -39,13 +38,8 @@ export const ContactStepPage = (props: ContactStepPageProps) => {
3938
return (
4039
<div className={style.contactStepPage}>
4140
<IllustrationStatic illustration={illustration} className={style.pictogram} />
42-
<ContactPageHeader
43-
contentProps={{
44-
data: {
45-
title,
46-
illustration,
47-
},
48-
}}
41+
<HeaderWithParent
42+
contentProps={{ data: { title, illustration } }}
4943
textAboveTitle={textAboveTitle}
5044
className={style.header}
5145
/>

0 commit comments

Comments
 (0)