More styling and mocking

This commit is contained in:
Dunemask 2022-08-06 21:21:41 +00:00
parent ea06cf2ebf
commit 360ff368e1
20 changed files with 354 additions and 109 deletions

View file

@ -3,19 +3,13 @@ import StoreContext from "../../ctx/StoreContext.jsx";
import JobContext from "../../ctx/JobContext.jsx";
import CatalogBox from "./CatalogBox.jsx";
import CatalogSearch from "./CatalogSearch.jsx";
import {useCatalogTests} from "../../Queries.jsx";
import TextField from "@mui/material/TextField";
export default function Catalog() {
const {
state: jobState,
dispatch: jobDispatch,
jobUpdate,
jobCreate,
} = useContext(JobContext);
const { state: store, updateStore } = useContext(StoreContext);
const {isLoading, data: tests} = useCatalogTests();
const handleSearchChange = (e) =>
updateStore({ catalogSearch: e.target.value });
@ -35,7 +29,7 @@ export default function Catalog() {
clearOnUnmount
/>
<h6>{store.catalogSearch}</h6>
{store.catalog.map((v, i) => (
{isLoading ? null : tests.map((v, i) => (
<CatalogBox key={i} catalogTest={v} />
))}
</div>