Skip to content

Commit 7e0189c

Browse files
authored
Merge pull request #2405 from navikt/redaktorvarsel-sider
redaktørvarsler vises kun på valgte sider
2 parents 867676f + d952c60 commit 7e0189c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/nextjs/src/components/_editor-only/global-warnings/EditorGlobalWarnings.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ export const RenderToEditorGlobalWarnings = ({ children }: { children: React.Rea
3030
};
3131

3232
export const EditorGlobalWarnings = ({ content }: { content: ContentProps }) => {
33+
const godkjenteSider = [
34+
'no.nav.navno:situation-page',
35+
'no.nav.navno:current-topic-page',
36+
'no.nav.navno:guide-page',
37+
'no.nav.navno:themed-article-page',
38+
'no.nav.navno:content-page-with-sidemenus',
39+
'no.nav.navno:tools-page',
40+
'no.nav.navno:generic-page',
41+
];
42+
43+
if (!godkjenteSider.includes(content.type)) {
44+
return;
45+
}
3346
const hasErrors = (): boolean => {
3447
return (
3548
KortUrlWarning({ content }) !== null ||
@@ -44,7 +57,7 @@ export const EditorGlobalWarnings = ({ content }: { content: ContentProps }) =>
4457
<>
4558
{hasErrors() && (
4659
<Alert variant="warning">
47-
Redaktørvarsel:
60+
<strong>Redaktørvarsel:</strong>
4861
<br />
4962
Disse problemene må rettes før publisering:
5063
<ul>

0 commit comments

Comments
 (0)