Kind of get account stuff working; IDE is throwing a fit right now

This commit is contained in:
Dane Everitt 2020-07-03 15:37:26 -07:00
parent 7cea5e630c
commit e8755ac598
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 176 additions and 43 deletions

View file

@ -3,6 +3,8 @@ import { useStoreState } from 'easy-peasy';
import { ApplicationStore } from '@/state';
import SetupTwoFactorModal from '@/components/dashboard/forms/SetupTwoFactorModal';
import DisableTwoFactorModal from '@/components/dashboard/forms/DisableTwoFactorModal';
import tw from 'twin.macro';
import Button from '@/components/elements/Button';
export default () => {
const user = useStoreState((state: ApplicationStore) => state.user.data!);
@ -17,38 +19,40 @@ export default () => {
onDismissed={() => setVisible(false)}
/>
}
<p className={'text-sm'}>
<p css={tw`text-sm`}>
Two-factor authentication is currently enabled on your account.
</p>
<div className={'mt-6'}>
<button
<div css={tw`mt-6`}>
<Button
color={'red'}
isSecondary
onClick={() => setVisible(true)}
className={'btn btn-red btn-secondary btn-sm'}
>
Disable
</button>
</Button>
</div>
</div>
:
<div>
{visible &&
<SetupTwoFactorModal
appear={true}
appear
visible={visible}
onDismissed={() => setVisible(false)}
/>
}
<p className={'text-sm'}>
<p css={tw`text-sm`}>
You do not currently have two-factor authentication enabled on your account. Click
the button below to begin configuring it.
</p>
<div className={'mt-6'}>
<button
<div css={tw`mt-6`}>
<Button
color={'green'}
isSecondary
onClick={() => setVisible(true)}
className={'btn btn-green btn-secondary btn-sm'}
>
Begin Setup
</button>
</Button>
</div>
</div>
;