Skip to content

Commit

Permalink
fix(webapp): responsive on faucet
Browse files Browse the repository at this point in the history
  • Loading branch information
leisterfrancisco committed Apr 8, 2022
1 parent 491b5b7 commit 2f08e32
Showing 1 changed file with 70 additions and 50 deletions.
120 changes: 70 additions & 50 deletions webapp/src/routes/Faucet.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,33 +109,45 @@ const Faucet = () => {

return (
<Grid container spacing={2}>
<Grid item xs={6}>
<Grid item xs={12} sm={6}>
<Card>
<CardContent>
<Typography variant="h5">{t('createAccount')}</Typography>
<Grid container alignItems="flex-end">
<TextField
key="action-field-issue-tokens"
label="Public Key (Active/Owner)"
variant="outlined"
className={classes.formControl}
value={publicKey}
onChange={(e) => setPublicKey(e.target.value)}
/>
<Button
type="submit"
variant="contained"
color="primary"
disabled={loadingCreateAccount}
endIcon={
loadingCreateAccount ? <CircularProgress size={20} /> : <></>
}
onClick={createAccount}
>
{t('createButton')}
</Button>
<Grid
container
alignItems="flex-end"
className={classes.formControl}
spacing={2}
>
<Grid item>
<TextField
key="action-field-issue-tokens"
label="Public Key (Active/Owner)"
variant="outlined"
value={publicKey}
onChange={(e) => setPublicKey(e.target.value)}
/>
</Grid>
<Grid item>
<Button
type="submit"
variant="contained"
color="primary"
disabled={loadingCreateAccount}
endIcon={
loadingCreateAccount ? (
<CircularProgress size={20} />
) : (
<></>
)
}
onClick={createAccount}
>
{t('createButton')}
</Button>
</Grid>
{newCreatedAccount && (
<Grid item xs={12}>
<Grid item xs={12} sm={6}>
<Typography variant="h5">{`${t(
'newCreatedAccount'
)} ${newCreatedAccount}`}</Typography>
Expand All @@ -145,37 +157,45 @@ const Faucet = () => {
</CardContent>
</Card>
</Grid>
<Grid item xs={6}>
<Grid item xs={12} sm={6}>
<Card>
<CardContent>
<Typography variant="h5">{t('issueTokens')}</Typography>
<Grid container alignItems="flex-end">
<TextField
key="action-field-issue-tokens"
label="Account (500 UOS)"
variant="outlined"
className={classes.formControl}
value={account}
onChange={(e) => setAccount(e.target.value)}
/>
<Button
type="submit"
variant="contained"
color="primary"
disabled={loadingTransferFaucetTokens}
endIcon={
loadingTransferFaucetTokens ? (
<CircularProgress size={20} />
) : (
<></>
)
}
onClick={transferTokens}
>
{t('getUOS')}
</Button>
<Grid
container
alignItems="flex-end"
className={classes.formControl}
spacing={2}
>
<Grid item>
<TextField
key="action-field-issue-tokens"
label="Account (500 UOS)"
variant="outlined"
value={account}
onChange={(e) => setAccount(e.target.value)}
/>
</Grid>
<Grid item>
<Button
type="submit"
variant="contained"
color="primary"
disabled={loadingTransferFaucetTokens}
endIcon={
loadingTransferFaucetTokens ? (
<CircularProgress size={20} />
) : (
<></>
)
}
onClick={transferTokens}
>
{t('getUOS')}
</Button>
</Grid>
{transferTokensTransaction && (
<Grid item xs={12}>
<Grid item xs={12} sm={6}>
<Typography variant="h5">
{t('transferTokensTransaction')}
</Typography>
Expand Down

0 comments on commit 2f08e32

Please sign in to comment.