This commit is contained in:
“spicecat” 2022-08-18 17:20:37 -04:00
commit cc20217677

View file

@ -39,6 +39,7 @@ export default function Question({
downvotes,
hasAcceptedAnswer,
status,
tags,
title,
text,
upvotes,
@ -62,7 +63,7 @@ export default function Question({
const [value, setValue] = useState(75);
canBounty = canBounty && !hasBounty
function handleBountyFix(){
function handleBountyFix() {
handleBounty(value)
}
return (
@ -92,6 +93,8 @@ export default function Question({
label={hasAcceptedAnswer ? 'yes' : 'no'}
size='small'
/>
<Typography display='inline' m={1}>Tags: {tags.join(', ')}</Typography>
<br />
<Button
component={Link}
to='../ask'
@ -151,8 +154,8 @@ export default function Question({
Add Bounty
</Button>
{ show &&
<TextField value = {value} size = "small" type = "number" inputProps={{min,max}} disabled = {!canBounty} label="bounty" onChange={(e) => {
{show &&
<TextField value={value} size="small" type="number" inputProps={{ min, max }} disabled={!canBounty} label="bounty" onChange={(e) => {
if (e.target.value === "") {
setValue(75);
return;
@ -167,7 +170,7 @@ export default function Question({
}
}}/>
}} />
}
</span>
</Tooltip>