Removed children from ShortUrlForm

This commit is contained in:
Alejandro Celaya
2021-03-27 10:41:13 +01:00
parent ca670d810d
commit 1403538660
3 changed files with 19 additions and 19 deletions

View File

@@ -71,18 +71,19 @@ export const EditShortUrl = (ShortUrlForm: FC<ShortUrlFormProps>) => ({
}
return (
<ShortUrlForm
initialState={getInitialState(shortUrl, shortUrlCreationSettings)}
saving={saving}
selectedServer={selectedServer}
mode="edit"
onSave={async (shortUrlData) => shortUrl && editShortUrl(shortUrl.shortCode, shortUrl.domain, shortUrlData)}
>
<>
<ShortUrlForm
initialState={getInitialState(shortUrl, shortUrlCreationSettings)}
saving={saving}
selectedServer={selectedServer}
mode="edit"
onSave={async (shortUrlData) => shortUrl && editShortUrl(shortUrl.shortCode, shortUrl.domain, shortUrlData)}
/>
{savingError && (
<Result type="error" className="mt-3">
<ShlinkApiError errorData={savingErrorData} fallbackMessage="An error occurred while updating short URL :(" />
</Result>
)}
</ShortUrlForm>
</>
);
};