conform to linter
This commit is contained in:
parent
c909efb7b7
commit
d2216e80da
|
@ -43,7 +43,7 @@ const authErrorMessages = {
|
||||||
default: 'Auth failed. Try again or choose a different method.'
|
default: 'Auth failed. Try again or choose a different method.'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function authErrorMessage(error) {
|
export function authErrorMessage (error) {
|
||||||
return error && (authErrorMessages[error] ?? authErrorMessages.default)
|
return error && (authErrorMessages[error] ?? authErrorMessages.default)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -372,14 +372,19 @@ function AuthMethods ({ methods }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className='form-label mt-3'>auth methods</div>
|
<div className='form-label mt-3'>auth methods</div>
|
||||||
{err && <Alert variant='danger' onClose={() => {
|
{err && (
|
||||||
|
<Alert
|
||||||
|
variant='danger' onClose={() => {
|
||||||
const { pathname, query: { error, nodata, ...rest } } = router
|
const { pathname, query: { error, nodata, ...rest } } = router
|
||||||
router.replace({
|
router.replace({
|
||||||
pathname,
|
pathname,
|
||||||
query: { nodata, ...rest }
|
query: { nodata, ...rest }
|
||||||
}, { pathname, query: { ...rest } }, { shallow: true })
|
}, { pathname, query: { ...rest } }, { shallow: true })
|
||||||
setErr(undefined)
|
setErr(undefined)
|
||||||
}} dismissible>{err}</Alert>}
|
}} dismissible
|
||||||
|
>{err}
|
||||||
|
</Alert>
|
||||||
|
)}
|
||||||
|
|
||||||
{providers?.map(provider => {
|
{providers?.map(provider => {
|
||||||
if (provider === 'email') {
|
if (provider === 'email') {
|
||||||
|
|
Loading…
Reference in New Issue