Commit e381489b authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

clear cat query when click show all

parent 7d243b62
...@@ -154,7 +154,18 @@ export default function Home() { ...@@ -154,7 +154,18 @@ export default function Home() {
</Select> </Select>
</FormControl> */} </FormControl> */}
<Box sx={{ display: "flex", overflowX: "scroll", maxWidth: "100vw" }}> <Box sx={{ display: "flex", overflowX: "scroll", maxWidth: "100vw" }}>
<Button variant={category === -1 ? "contained": "text"} className={`${category === -1 ? "" : "bg-white"} mx-1`}> <Button
variant={category === -1 ? "contained" : "text"}
className={`${category === -1 ? "" : "bg-white"} mx-1`}
onClick={() => {
let que = router.query;
delete que.cat;
router.push({
pathname: location.pathname,
query: { ...que },
});
}}
>
ทั้งหมด ทั้งหมด
</Button> </Button>
{categoryList.map((cat, idx) => ( {categoryList.map((cat, idx) => (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment