mirror of
https://github.com/lemeow125/Ivy-Frontend.git
synced 2025-05-12 09:31:07 +08:00
Made products page fully functional with delete product
This commit is contained in:
parent
3ac7785c3c
commit
57f11b024b
9 changed files with 134 additions and 104 deletions
|
@ -4,11 +4,21 @@ import { Switch } from "@mui/material";
|
|||
import TableView from "../../Components/ProductsPage/TableView/TableView";
|
||||
import BlobView from "../../Components/ProductsPage/BlobView/BlobView";
|
||||
import { ProductList } from "../../Interfaces/Interfaces";
|
||||
import styles from "../../styles";
|
||||
|
||||
export interface props {}
|
||||
|
||||
export default function ViewManager(props: ProductList) {
|
||||
const [tableView, toggleTableView] = useState(false);
|
||||
const [tableView, toggleTableView] = useState(true);
|
||||
if (props.Products.length === 0) {
|
||||
return (
|
||||
<div style={{ ...styles.content_column, ...{ alignItems: "center" } }}>
|
||||
<p style={{ ...styles.text_white, ...styles.text_L }}>
|
||||
No products yet. Add one!
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
if (tableView) {
|
||||
return (
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue