Allowed to customize initial state for forward query

This commit is contained in:
Alejandro Celaya
2021-10-13 23:10:22 +02:00
parent 9e6907deb4
commit 1bf3569774
4 changed files with 59 additions and 15 deletions

View File

@@ -30,7 +30,7 @@ const getInitialState = (settings?: ShortUrlCreationSettings): ShortUrlData => (
maxVisits: undefined,
findIfExists: false,
validateUrl: settings?.validateUrls ?? false,
forwardQuery: true,
forwardQuery: settings?.forwardQuery ?? true,
});
const CreateShortUrl = (ShortUrlForm: FC<ShortUrlFormProps>, CreateShortUrlResult: FC<CreateShortUrlResultProps>) => ({