Code improvements (#1086)

* Extract code into hook
* Refactor code to remove let
* Reformat code
* Extract version-info-modal into components
* Use main block in landinglayout
* Add fixedWidth and classname attribute to IconButton

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Tilman Vatteroth 2021-03-10 22:45:05 +01:00 committed by GitHub
parent 029295dd3b
commit 107f0f6fa3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 192 additions and 142 deletions

View file

@ -1,7 +1,7 @@
/*
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
SPDX-License-Identifier: AGPL-3.0-only
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { FormEvent, useCallback, useState } from 'react'
@ -42,8 +42,7 @@ export const ViaInternal: React.FC = () => {
size="sm"
placeholder={ t('login.auth.username') }
onChange={ (event) => setUsername(event.currentTarget.value) } className="bg-dark text-light"
autoComplete='username'
/>
autoComplete='username'/>
</Form.Group>
<Form.Group controlId="internal-password">
@ -54,8 +53,7 @@ export const ViaInternal: React.FC = () => {
placeholder={ t('login.auth.password') }
onChange={ (event) => setPassword(event.currentTarget.value) }
className="bg-dark text-light"
autoComplete='current-password'
/>
autoComplete='current-password'/>
</Form.Group>
<Alert className="small" show={ error } variant="danger">