Skip to content

Commit 0b7e4c9

Browse files
Merge pull request #1909 from navikt/vise-riktig-dato-for-oppdatert
Endrer visning av publisert-dato til publish.from i aktuelt-side
2 parents e718810 + 745ba09 commit 0b7e4c9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/components/_common/headers/featured-header/FeaturedHeader.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ type Props = {
1515
};
1616

1717
export const FeaturedHeader = ({ contentProps }: Props) => {
18-
const { displayName, createdTime, modifiedTime, data } = contentProps;
18+
const { displayName, modifiedTime, data, publish, createdTime } = contentProps;
1919
const { language } = usePageContentProps();
2020
const pageTitle = data.title || displayName;
2121

22+
const publishFrom = publish?.from ?? createdTime;
2223
const getFeaturedTranslations = translator('currentTopic', language);
2324

2425
const tagLineLabel = getFeaturedTranslations('tag');
@@ -31,7 +32,7 @@ export const FeaturedHeader = ({ contentProps }: Props) => {
3132
{pageTitle}
3233
</Heading>
3334
</header>
34-
<DateLine createdTime={createdTime} modifiedTime={modifiedTime} language={language} />
35+
<DateLine createdTime={publishFrom} modifiedTime={modifiedTime} language={language} />
3536
</>
3637
);
3738
};

src/components/parts/frontpage-current-topics/FrontpageCurrentTopicsPart.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const FrontpageCurrentTopicsPart = ({
4040
return null;
4141
}
4242

43-
const displayDate = item.publish?.first ?? item.modifiedTime;
43+
const displayDate = item.publish?.from ?? item.modifiedTime;
4444

4545
return (
4646
<li key={item._id}>

0 commit comments

Comments
 (0)