Fakultas Ilmu Komputer UI

Commit 209082cb authored by FadhilP's avatar FadhilP
Browse files

[REFACTOR] Reallocate error

parent 081b85ca
import React from "react";
import { css } from "@emotion/core";
import { ErrorDiv } from "../../component/html/html";
import FormProduk from "./FormProduk";
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
import ErrorOutlineIcon from "@material-ui/icons/ErrorOutline";
......@@ -38,7 +37,6 @@ const EditProduk = ({ productId }) => {
flex-direction: column;
`}
>
{error && <ErrorDiv>Error !, Data tidak dapat disimpan</ErrorDiv>}
<div
css={css`
display: flex;
......@@ -84,7 +82,7 @@ const EditProduk = ({ productId }) => {
Informasi Produk
</div>
</div>
<FormProduk {...{ onSubmit, initialData }} />
<FormProduk {...{ onSubmit, initialData, error }} />
</div>
);
};
......
Supports Markdown
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