Tweak positioning of add funds button, no green initial probability
This commit is contained in:
parent
5947be6647
commit
ca38640b89
|
@ -57,23 +57,22 @@ export function AmountInput(props: {
|
|||
onChange={(e) => onAmountChange(e.target.value)}
|
||||
/>
|
||||
</label>
|
||||
{user && (
|
||||
<Row className="text-sm text-gray-500 justify-between mt-3 gap-4 items-end">
|
||||
{error ? (
|
||||
<div className="font-medium tracking-wide text-red-500 text-xs whitespace-nowrap mr-auto self-center">
|
||||
{user &&
|
||||
(error ? (
|
||||
<div className="font-medium tracking-wide text-red-500 text-xs whitespace-nowrap mr-auto self-center mt-4">
|
||||
{error}
|
||||
</div>
|
||||
) : (
|
||||
<Col>
|
||||
<div className="whitespace-nowrap">Remaining balance</div>
|
||||
<div className="text-neutral mt-1">
|
||||
{formatMoney(Math.floor(remainingBalance))}
|
||||
<Col className="text-sm mt-3">
|
||||
<div className="text-gray-500 whitespace-nowrap mb-2">
|
||||
Remaining balance
|
||||
</div>
|
||||
</Col>
|
||||
)}
|
||||
{user.balance !== 1000 && <AddFundsButton className="mt-1" />}
|
||||
<Row className="gap-4">
|
||||
<div>{formatMoney(Math.floor(remainingBalance))}</div>
|
||||
{user.balance !== 1000 && <AddFundsButton />}
|
||||
</Row>
|
||||
)}
|
||||
</Col>
|
||||
))}
|
||||
</Col>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ export default function NewContract() {
|
|||
const [question, setQuestion] = useState('')
|
||||
const [description, setDescription] = useState('')
|
||||
|
||||
const [ante, setAnte] = useState<number | undefined>(0)
|
||||
const [ante, setAnte] = useState<number | undefined>(undefined)
|
||||
const [anteError, setAnteError] = useState<string | undefined>()
|
||||
const [closeDate, setCloseDate] = useState('')
|
||||
|
||||
|
@ -111,7 +111,7 @@ export default function NewContract() {
|
|||
<input
|
||||
type="number"
|
||||
value={initialProb}
|
||||
className="input input-bordered input-md text-primary text-3xl w-24"
|
||||
className="input input-bordered input-md text-3xl w-24"
|
||||
disabled={isSubmitting}
|
||||
min={1}
|
||||
max={99}
|
||||
|
@ -155,7 +155,6 @@ export default function NewContract() {
|
|||
<span className="mb-1">Subsidize your market</span>
|
||||
</label>
|
||||
<AmountInput
|
||||
className="items-start"
|
||||
amount={ante}
|
||||
onChange={setAnte}
|
||||
error={anteError}
|
||||
|
|
Loading…
Reference in New Issue
Block a user