This commit is contained in:
“spicecat” 2022-08-18 17:47:22 -04:00
commit f46f407d6b
2 changed files with 9 additions and 9 deletions

View file

@ -31,16 +31,16 @@ export default function Badges({ badges: { obtained, unobtained } }) {
return ( return (
<> <>
<Grid container spacing={{ xs: 2, md: 3 }} columns={{ xs: 4, sm: 8, md: 12 }}> <Grid container spacing={{ xs: 2, md: 3 }} columns={{ xs: 4, sm: 8, md: 12 }}>
<Grid item xs={4} sm={8} md={12}> <Grid item xs={2} sm={4} md={4}>
<Typography variant='h5'>Obtained Badges</Typography> <Typography variant='h5'>Obtained Badges</Typography>
</Grid> </Grid>
{badgesGrid(obtained)} {badgesGrid(obtained)}
</Grid> </Grid>
<Grid container spacing={{ xs: 2, md: 3 }} columns={{ xs: 4, sm: 8, md: 12 }}> <Grid container spacing={{ xs: 2, md: 3 }} columns={{ xs: 4, sm: 8, md: 12 }}>
<Grid item xs={4} sm={8} md={12}> <Grid item xs={2} sm={4} md={4}>
<Typography variant='h5'>Unobtained Badges</Typography> <Typography variant='h5'>Unobtained Badges</Typography>
</Grid> </Grid>
{badgesGrid(unobtained)} {badgesGrid(unobtained)}
</Grid> </Grid>
</> </>
); );

View file

@ -79,7 +79,7 @@ export default function QuestionController() {
} }
function handleBounty(amount) { function handleBounty(amount) {
if (show) { if (show) {
const data = { user: userData.username, hasAcceptedAnswer: questionData.hasAcceptedAnswer, amount: amount, isOpen: (questionData.status !== 'closed'), hasBounty: questionData.hasBounty } const data = {amount: amount}
addBounty(question_id, data) addBounty(question_id, data)
questionData.hasBounty = amount; questionData.hasBounty = amount;
userData.points -= amount; userData.points -= amount;