conform to linter

This commit is contained in:
keyan 2023-07-31 08:39:10 -05:00
parent c909efb7b7
commit d2216e80da
2 changed files with 14 additions and 9 deletions

View File

@ -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)
} }

View File

@ -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 && (
const { pathname, query: { error, nodata, ...rest } } = router <Alert
router.replace({ variant='danger' onClose={() => {
pathname, const { pathname, query: { error, nodata, ...rest } } = router
query: { nodata, ...rest } router.replace({
}, { pathname, query: { ...rest } }, { shallow: true }) pathname,
setErr(undefined) query: { nodata, ...rest }
}} dismissible>{err}</Alert>} }, { pathname, query: { ...rest } }, { shallow: true })
setErr(undefined)
}} dismissible
>{err}
</Alert>
)}
{providers?.map(provider => { {providers?.map(provider => {
if (provider === 'email') { if (provider === 'email') {