fix(exportModal/index.tsx): add state for invalidName to handle invalid flow names in the export modal

feat(exportModal/index.tsx): pass invalidName state and setInvalidName function as props to EditFlowSettings component to handle invalid flow names in the export modal
This commit is contained in:
anovazzi1 2023-08-03 18:40:17 -03:00
commit 4aa6810af6

View file

@ -13,6 +13,7 @@ const ExportModal = forwardRef((props: { children: ReactNode }, ref) => {
useContext(TabsContext);
const [checked, setChecked] = useState(false);
const [name, setName] = useState(flows.find((f) => f.id === tabId).name);
const [invalidName, setInvalidName] = useState(false);
const [description, setDescription] = useState(
flows.find((f) => f.id === tabId).description
);
@ -30,6 +31,8 @@ const ExportModal = forwardRef((props: { children: ReactNode }, ref) => {
</BaseModal.Header>
<BaseModal.Content>
<EditFlowSettings
invalidName={invalidName}
setInvalidName={setInvalidName}
name={name}
description={description}
flows={flows}