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)}
|
onChange={(e) => onAmountChange(e.target.value)}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
{user && (
|
{user &&
|
||||||
<Row className="text-sm text-gray-500 justify-between mt-3 gap-4 items-end">
|
(error ? (
|
||||||
{error ? (
|
<div className="font-medium tracking-wide text-red-500 text-xs whitespace-nowrap mr-auto self-center mt-4">
|
||||||
<div className="font-medium tracking-wide text-red-500 text-xs whitespace-nowrap mr-auto self-center">
|
|
||||||
{error}
|
{error}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Col>
|
<Col className="text-sm mt-3">
|
||||||
<div className="whitespace-nowrap">Remaining balance</div>
|
<div className="text-gray-500 whitespace-nowrap mb-2">
|
||||||
<div className="text-neutral mt-1">
|
Remaining balance
|
||||||
{formatMoney(Math.floor(remainingBalance))}
|
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
<Row className="gap-4">
|
||||||
)}
|
<div>{formatMoney(Math.floor(remainingBalance))}</div>
|
||||||
{user.balance !== 1000 && <AddFundsButton className="mt-1" />}
|
{user.balance !== 1000 && <AddFundsButton />}
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
</Col>
|
||||||
|
))}
|
||||||
</Col>
|
</Col>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ export default function NewContract() {
|
||||||
const [question, setQuestion] = useState('')
|
const [question, setQuestion] = useState('')
|
||||||
const [description, setDescription] = 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 [anteError, setAnteError] = useState<string | undefined>()
|
||||||
const [closeDate, setCloseDate] = useState('')
|
const [closeDate, setCloseDate] = useState('')
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ export default function NewContract() {
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
value={initialProb}
|
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}
|
disabled={isSubmitting}
|
||||||
min={1}
|
min={1}
|
||||||
max={99}
|
max={99}
|
||||||
|
@ -155,7 +155,6 @@ export default function NewContract() {
|
||||||
<span className="mb-1">Subsidize your market</span>
|
<span className="mb-1">Subsidize your market</span>
|
||||||
</label>
|
</label>
|
||||||
<AmountInput
|
<AmountInput
|
||||||
className="items-start"
|
|
||||||
amount={ante}
|
amount={ante}
|
||||||
onChange={setAnte}
|
onChange={setAnte}
|
||||||
error={anteError}
|
error={anteError}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user