@@ -6,7 +6,7 @@ import { IllustrationStatic } from 'components/_common/illustration/static/Illus
6
6
import { PictogramsProps } from 'types/content-props/pictograms' ;
7
7
import { LenkeBase } from 'components/_common/lenke/lenkeBase/LenkeBase' ;
8
8
import { LenkeInline } from 'components/_common/lenke/lenkeInline/LenkeInline' ;
9
- import { LinkWithIngressMixin } from 'types/component-props/_mixins' ;
9
+ import { InternalLinkMixin } from 'types/component-props/_mixins' ;
10
10
import style from './ContactStepPage.module.scss' ;
11
11
12
12
export type ContactStepPageProps = ContentCommonProps & {
@@ -18,13 +18,8 @@ export type ContactStepPageProps = ContentCommonProps & {
18
18
html : string ;
19
19
linkPanelsHeading : string ;
20
20
linkPanelsSubHeading : string ;
21
- linkPanels : LinkWithIngressMixin [ ] ;
22
- link : {
23
- internal : {
24
- target : { _path : string } ;
25
- text : string ;
26
- } ;
27
- } ;
21
+ linkPanels : ( InternalLinkMixin & { ingress ?: string } ) [ ] ;
22
+ backLink : InternalLinkMixin ;
28
23
} ;
29
24
} ;
30
25
@@ -38,7 +33,7 @@ export const ContactStepPage = (props: ContactStepPageProps) => {
38
33
linkPanelsHeading,
39
34
linkPanelsSubHeading,
40
35
linkPanels,
41
- link ,
36
+ backLink ,
42
37
} = data ;
43
38
44
39
return (
@@ -69,15 +64,16 @@ export const ContactStepPage = (props: ContactStepPageProps) => {
69
64
< li key = { index } >
70
65
< LinkPanel
71
66
as = { LenkeBase }
72
- //TODO finn utav ekstern lenke
73
- href = { linkPanel . link . internal . target . _path }
67
+ href = { linkPanel . target . _path }
74
68
className = { style . linkPanel }
75
69
// TODO finn utav analytics
76
70
// analyticsComponent={'mellomsteg'}
77
71
// analyticsLinkGroup={currentStepData.stepsHeadline}
78
72
// analyticsLabel={step.label}s
79
73
>
80
- < LinkPanel . Title > { linkPanel . link . internal . text } </ LinkPanel . Title >
74
+ < LinkPanel . Title >
75
+ { linkPanel . text ?? linkPanel . target . displayName }
76
+ </ LinkPanel . Title >
81
77
{ linkPanel . ingress && (
82
78
< LinkPanel . Description >
83
79
{ linkPanel . ingress }
@@ -88,9 +84,9 @@ export const ContactStepPage = (props: ContactStepPageProps) => {
88
84
) ) }
89
85
</ ul >
90
86
</ div >
91
- < div className = { style . link } >
92
- < LenkeInline href = { link . internal . target . _path } > { link . internal . text } </ LenkeInline >
93
- </ div >
87
+ < LenkeInline href = { backLink . target . _path } className = { style . backLink } >
88
+ { backLink . text ?? backLink . target . displayName }
89
+ </ LenkeInline >
94
90
</ div >
95
91
) ;
96
92
} ;
0 commit comments