From e5e57982729868bcd1529a6868d18173026302a5 Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Fri, 29 Sep 2023 21:12:01 +0200 Subject: [PATCH] refactor: update type --- .../common/components/input/colour-input/SwatchSelect.tsx | 6 +++--- .../features/event-editor/composite/CountedTextArea.tsx | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/client/src/common/components/input/colour-input/SwatchSelect.tsx b/apps/client/src/common/components/input/colour-input/SwatchSelect.tsx index bbafefec5..fd81d7aca 100644 --- a/apps/client/src/common/components/input/colour-input/SwatchSelect.tsx +++ b/apps/client/src/common/components/input/colour-input/SwatchSelect.tsx @@ -1,6 +1,6 @@ import { useCallback } from 'react'; -import { TitleActions } from '../../../../features/event-editor/composite/EventEditorDataLeft'; +import { EditorUpdateFields } from '../../../../features/event-editor/EventEditor'; import Swatch from './Swatch'; @@ -8,8 +8,8 @@ import style from './SwatchSelect.module.scss'; interface ColourInputProps { value: string; - name: TitleActions; - handleChange: (newValue: TitleActions, name: string) => void; + name: EditorUpdateFields; + handleChange: (newValue: EditorUpdateFields, name: string) => void; } const colours = [ diff --git a/apps/client/src/features/event-editor/composite/CountedTextArea.tsx b/apps/client/src/features/event-editor/composite/CountedTextArea.tsx index 225e1e65a..10de23bdf 100644 --- a/apps/client/src/features/event-editor/composite/CountedTextArea.tsx +++ b/apps/client/src/features/event-editor/composite/CountedTextArea.tsx @@ -2,16 +2,15 @@ import { useCallback } from 'react'; import { Textarea } from '@chakra-ui/react'; import useReactiveTextInput from '../../../common/components/input/text-input/useReactiveTextInput'; - -import { TitleActions } from './EventEditorDataLeft'; +import { EditorUpdateFields } from '../EventEditor'; import style from '../EventEditor.module.scss'; interface CountedTextAreaProps { - field: TitleActions; + field: EditorUpdateFields; label: string; initialValue: string; - submitHandler: (field: TitleActions, value: string) => void; + submitHandler: (field: EditorUpdateFields, value: string) => void; } export default function CountedTextArea(props: CountedTextAreaProps) {