move claim button
This commit is contained in:
parent
5e8b9711dc
commit
6563082746
|
@ -38,7 +38,19 @@ export default function ClaimPage() {
|
||||||
<div className="mx-auto max-w-xl px-2">
|
<div className="mx-auto max-w-xl px-2">
|
||||||
<Row className="items-center justify-between">
|
<Row className="items-center justify-between">
|
||||||
<Title text={`Claim M$${manalink.amount} mana`} />
|
<Title text={`Claim M$${manalink.amount} mana`} />
|
||||||
<div className="my-auto">
|
<div className="my-auto"></div>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<ManalinkCard info={info} />
|
||||||
|
|
||||||
|
{error && (
|
||||||
|
<section className="my-5 text-red-500">
|
||||||
|
<p>Failed to claim manalink.</p>
|
||||||
|
<p>{error}</p>
|
||||||
|
</section>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<Row className="items-center">
|
||||||
<Button
|
<Button
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
setClaiming(true)
|
setClaiming(true)
|
||||||
|
@ -56,9 +68,7 @@ export default function ClaimPage() {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
const message =
|
const message =
|
||||||
e && e instanceof Object
|
e && e instanceof Object ? e.toString() : 'An error occurred.'
|
||||||
? e.toString()
|
|
||||||
: 'An error occurred.'
|
|
||||||
setError(message)
|
setError(message)
|
||||||
}
|
}
|
||||||
setClaiming(false)
|
setClaiming(false)
|
||||||
|
@ -66,17 +76,9 @@ export default function ClaimPage() {
|
||||||
disabled={claiming}
|
disabled={claiming}
|
||||||
size="lg"
|
size="lg"
|
||||||
>
|
>
|
||||||
{user ? 'Claim' : 'Login'}
|
{user ? `Claim M$${manalink.amount}` : 'Login to claim'}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
|
||||||
</Row>
|
</Row>
|
||||||
<ManalinkCard info={info} />
|
|
||||||
{error && (
|
|
||||||
<section className="my-5 text-red-500">
|
|
||||||
<p>Failed to claim manalink.</p>
|
|
||||||
<p>{error}</p>
|
|
||||||
</section>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user