mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
feat(listing/nui): hide/show on modal status
This commit is contained in:
1 parent
6c8ab4aadd
commit
fc211acb98
1 file changed
+22
-1
@@ -1,8 +1,29 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { useListing } from "../../hooks/useListing";
|
import { useListing } from "../../hooks/useListing";
|
||||||
import { SelloutList } from "./SelloutList";
|
import { SelloutList } from "./SelloutList";
|
||||||
|
import SelloutSearch from "../search/SelloutSearch"
|
||||||
|
import {useListingModal} from "../../hooks/useListingModal";
|
||||||
|
|
||||||
|
import { makeStyles, Theme } from "@material-ui/core/styles";
|
||||||
|
|
||||||
|
const useStyles = makeStyles((theme: Theme) => ({
|
||||||
|
hidden: {
|
||||||
|
display: 'none'
|
||||||
|
},
|
||||||
|
show: {
|
||||||
|
display: 'block'
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
|
||||||
export const SelloutListContainer = () => {
|
export const SelloutListContainer = () => {
|
||||||
|
const { modal } = useListingModal()
|
||||||
const { listing } = useListing();
|
const { listing } = useListing();
|
||||||
return <SelloutList listings={listing} />;
|
|
||||||
|
const classes = useStyles();
|
||||||
|
return (
|
||||||
|
<div className={modal ? classes.hidden : classes.show}>
|
||||||
|
<SelloutSearch />
|
||||||
|
<SelloutList listings={listing} />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user