mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-02-19 08:16:37 +00:00
Fix some buttons acting like submits
This commit is contained in:
@@ -73,7 +73,7 @@ const CreateServer: FCWithDeps<CreateServerProps, CreateServerDeps> = ({ servers
|
||||
{!hasServers && (
|
||||
<ImportServersBtn tooltipPlacement="top" onImport={setServersImported} onError={setErrorImporting} />
|
||||
)}
|
||||
{hasServers && <Button variant="secondary" onClick={goBack}>Cancel</Button>}
|
||||
{hasServers && <Button type="button" variant="secondary" onClick={goBack}>Cancel</Button>}
|
||||
<Button type="submit">Create server</Button>
|
||||
</ServerForm>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ const EditServer: FCWithDeps<EditServerProps, EditServerDeps> = withSelectedServ
|
||||
initialValues={selectedServer}
|
||||
onSubmit={handleSubmit}
|
||||
>
|
||||
<Button variant="secondary" onClick={goBack}>Cancel</Button>
|
||||
<Button type="button" variant="secondary" onClick={goBack}>Cancel</Button>
|
||||
<Button>Save</Button>
|
||||
</ServerForm>
|
||||
</NoMenuLayout>
|
||||
|
||||
@@ -84,7 +84,13 @@ const ImportServersBtn: FCWithDeps<ImportServersBtnConnectProps, ImportServersBt
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button variant="secondary" id="importBtn" className={className} onClick={() => ref.current?.click()}>
|
||||
<Button
|
||||
type="button"
|
||||
variant="secondary"
|
||||
id="importBtn"
|
||||
className={className}
|
||||
onClick={() => ref.current?.click()}
|
||||
>
|
||||
<FontAwesomeIcon icon={importIcon} fixedWidth /> {children ?? 'Import from file'}
|
||||
</Button>
|
||||
<UncontrolledTooltip placement={tooltipPlacement} target="importBtn">
|
||||
|
||||
Reference in New Issue
Block a user