From 140353866012275b239fb4715d37b88e5084b843 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 27 Mar 2021 10:41:13 +0100 Subject: [PATCH] Removed children from ShortUrlForm --- src/short-urls/CreateShortUrl.tsx | 17 +++++++++-------- src/short-urls/EditShortUrl.tsx | 17 +++++++++-------- src/short-urls/ShortUrlForm.tsx | 4 +--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/short-urls/CreateShortUrl.tsx b/src/short-urls/CreateShortUrl.tsx index 13a44654..cc97427f 100644 --- a/src/short-urls/CreateShortUrl.tsx +++ b/src/short-urls/CreateShortUrl.tsx @@ -43,19 +43,20 @@ const CreateShortUrl = (ShortUrlForm: FC, CreateShortUrlResul const initialState = useMemo(() => getInitialState(shortUrlCreationSettings), [ shortUrlCreationSettings ]); return ( - + <> + - + ); }; diff --git a/src/short-urls/EditShortUrl.tsx b/src/short-urls/EditShortUrl.tsx index 5d2078bf..4d83a81e 100644 --- a/src/short-urls/EditShortUrl.tsx +++ b/src/short-urls/EditShortUrl.tsx @@ -71,18 +71,19 @@ export const EditShortUrl = (ShortUrlForm: FC) => ({ } return ( - shortUrl && editShortUrl(shortUrl.shortCode, shortUrl.domain, shortUrlData)} - > + <> + shortUrl && editShortUrl(shortUrl.shortCode, shortUrl.domain, shortUrlData)} + /> {savingError && ( )} - + ); }; diff --git a/src/short-urls/ShortUrlForm.tsx b/src/short-urls/ShortUrlForm.tsx index 914f6d7b..1d51e91f 100644 --- a/src/short-urls/ShortUrlForm.tsx +++ b/src/short-urls/ShortUrlForm.tsx @@ -39,7 +39,7 @@ export const ShortUrlForm = ( TagsSelector: FC, ForServerVersion: FC, DomainSelector: FC, -): FC => ({ mode, saving, onSave, initialState, selectedServer, children }) => { // eslint-disable-line complexity +): FC => ({ mode, saving, onSave, initialState, selectedServer }) => { // eslint-disable-line complexity const [ shortUrlData, setShortUrlData ] = useState(initialState); const isEdit = mode === 'edit'; const changeTags = (tags: string[]) => setShortUrlData({ ...shortUrlData, tags: tags.map(normalizeTag) }); @@ -201,8 +201,6 @@ export const ShortUrlForm = ( {saving ? 'Saving...' : 'Save'} - - {children} ); };