From 15af74bed4fdeb07eb3e1f873183a363fbd54130 Mon Sep 17 00:00:00 2001 From: emillub <145599402+emillub@users.noreply.github.com> Date: Wed, 25 Sep 2024 21:43:04 +0200 Subject: [PATCH] Add warning to pin to frontpage --- app/routes/articles/components/ArticleEditor.tsx | 12 +++++++++++- .../components/EventEditor/EditorSection/Header.tsx | 9 +++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/app/routes/articles/components/ArticleEditor.tsx b/app/routes/articles/components/ArticleEditor.tsx index 565a5b7017..ea4f3c5fb2 100644 --- a/app/routes/articles/components/ArticleEditor.tsx +++ b/app/routes/articles/components/ArticleEditor.tsx @@ -1,6 +1,7 @@ import { Button, ButtonGroup, + Card, ConfirmModal, Icon, LinkButton, @@ -158,7 +159,7 @@ const ArticleEditor = () => { validate={validate} initialValues={initialValues} > - {({ handleSubmit }) => ( + {({ handleSubmit, values }) => (
{ type="checkbox" component={CheckBox.Field} /> + {values.pinned && ( + + + OBS! Du må ha godkjenning fra ledelsen for å feste til + forsiden. + + + )} + + {values.pinned && ( + + + OBS! Du må ha godkjenning fra ledelsen for å feste til forsiden. + + + )} +