Skip to content

Commit

Permalink
Update resulting forms
Browse files Browse the repository at this point in the history
  • Loading branch information
mrushkova committed Apr 29, 2024
1 parent 881c7ae commit fa22b5f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/frontend/src/components/form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const FormWrapper = styled.div`
flex-direction: column;
row-gap: 16px;
padding: 82px 0 82px;
width: 431px;
width: 440px;
`

export const FormSectionWrapper = styled(FormWrapper)`
Expand Down
9 changes: 2 additions & 7 deletions packages/frontend/src/components/userActious/BidAwaiting.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
import styled from 'styled-components'
import { FormWideWrapper } from '@/components/form'
import { useReadAuctionParams } from '@/blockchain/hooks/useReadAuctionParams'
import { formatDate } from '@/utils/formatters/formatDate'

export const BidAwaiting = () => {
const { biddingStartTime } = useReadAuctionParams()
return (
<BidAwaitingWrapper>
<FormWideWrapper>
<h2>Bidding starts on {formatDate(biddingStartTime)}</h2>
</BidAwaitingWrapper>
</FormWideWrapper>
)
}

const BidAwaitingWrapper = styled(FormWideWrapper)`
padding: 0 54px;
`
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { FormHeading, FormText, FormWideWrapper } from '@/components/form'
import { styled } from 'styled-components'

export const AwaitingResults = () => (
<FormWideWrapper>
<BidAwaitingWrapper>
<FormHeading>Wait for results ⏳</FormHeading>
<FormText>The bidding window has closed. Waiting for the organizers to settle the contest.</FormText>
</FormWideWrapper>
</BidAwaitingWrapper>
)

const BidAwaitingWrapper = styled(FormWideWrapper)`
width: 460px;
`
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ClaimVoucherSection = ({ setVoucher }: ClaimVoucherSectionProps) =>
<VoucherOption>
{error && <ErrorNotifications error={error} onClick={mutate} reset={reset} />}
<Button view="primary" wide onClick={mutate} isLoading={isPending}>
Claim voucher code
Get voucher code
</Button>
{state !== 'ClaimingClosed' && <VoucherTimeLeft />}
</VoucherOption>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ export const VoucherTimeLeft = () => {

return (
<TimeRow>
<b>{timeLeft}</b> <span>left to redeem your voucher code</span>
<h3>{timeLeft}</h3> <span>left to redeem your voucher code</span>
</TimeRow>
)
}

const TimeRow = styled.div`
display: flex;
justify-content: center;
align-items: baseline;
flex-wrap: wrap;
column-gap: 16px;
width: 100%;
color: ${Colors.Black};
`
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const WinBidForm = ({ userBid, withdrawalAmount, setView, voucher, setVou
}

export const WinnerForm = styled(Form)`
max-width: 440px;
row-gap: 20px;
text-align: center;
`
Expand All @@ -62,7 +63,7 @@ const winTypeToText: Record<WinType, ReactNode> = {
),
[WinType.Raffle]: (
<span>
You were chosen <b>in the raffle</b> and have successfully purchased a ticket!
You were chosen <b>in the raffle!</b>
</span>
),
}
Expand Down

0 comments on commit fa22b5f

Please sign in to comment.