fix search initalvalues

This commit is contained in:
“spicecat” 2022-08-18 17:02:02 -04:00
commit 0350ef8c08
3 changed files with 9 additions and 7 deletions

View file

@ -11,6 +11,7 @@ export default function ListQuestion({
creator,
downvotes,
status,
tags,
text,
title,
upvotes,
@ -19,17 +20,18 @@ export default function ListQuestion({
}) {
const sm = useMediaQuery((theme) => theme.breakpoints.only('sm'));
const md = useMediaQuery((theme) => theme.breakpoints.only('md'));
console.log(123123, tags)
return (
<span key={question_id}>
<ListItem disablePadding>
<Grid container>
<Grid item xs={2}>
<Stack justifyContent='center' sx={{ height: '100%' }}>
{sm || md ? <ListQuestionInfo {...{upvotes, downvotes, answers, views, inline: false}}/> : null}
{sm || md ? <ListQuestionInfo {...{ upvotes, downvotes, answers, views, inline: false }} /> : null}
</Stack>
</Grid>
<Grid item xs={10}>
{sm || md ? null: <ListQuestionInfo {...{upvotes, downvotes, answers, views, inline: true}}/>}
{sm || md ? null : <ListQuestionInfo {...{ upvotes, downvotes, answers, views, inline: true }} />}
<CreationInfoTag {...{ createdAt, creator }} />
<Typography
variant='h6'

View file

@ -7,7 +7,7 @@ export default function PaginatedList({ count, Component, data, handleChangePage
<Component {...item} key={index} />
))}
{count > 1 && (
<Box fullWidth display='flex' justifyContent='center' sx={{ margin: '1vh 0' }}>
<Box display='flex' justifyContent='center' sx={{ margin: '1vh 0' }}>
<Pagination
count={count}
onChange={handleChangePage}

View file

@ -10,15 +10,15 @@ export default function FormController({
validate,
validationSchema,
children,
initialValues
initialValues = {}
}) {
const { setContent } = useForm();
useEffect(() => {
setContent('');
}, [setContent]);
const handleChange = (e) => {