forked from gaurav-sync/overstock-MERN-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProductPage Backup.txt
44 lines (42 loc) · 1.12 KB
/
ProductPage Backup.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { Box, Grid, Heading, Spinner } from "@chakra-ui/react";
import { useState } from "react";
import { SortContext } from "../../Components/Cotext";
import LeftBars from "./leftSidebar";
import { Products } from "./product_page1";
import SortDropdown from "./sortDropdown";
function Product_page_new({ order_new }) {
const [user, setUser] = useState("");
const changeOrder = (new_user) => {
setUser(new_user);
};
return (
<SortContext.Provider value={{ user, changeOrder }}>
<Box
mt={{
base: "70px",
sm: "70px",
md: "70px",
lg: "150px",
}}
>
<Box id="sortDropdown_Div">
<SortDropdown order_set={user} changeOrder={changeOrder} />
</Box>
<Grid
templateColumns={{
base: "1fr",
sm: "1fr",
md: "1fr",
lg: "0.3fr 1fr",
}}
spacing={20}
gap={5}
>
<LeftBars order_set={user} changeOrder={changeOrder} />
<Products />
</Grid>
</Box>
</SortContext.Provider>
);
}
export default Product_page_new;