Fakultas Ilmu Komputer UI

Commit 6c9d4e54 authored by FadhilP's avatar FadhilP
Browse files

[REFACTOR] Reallocate error

parent 209082cb
import React from "react";
import { css } from "@emotion/core";
import { ErrorDiv } from "../../component/html/html";
import FormProduk from "./FormProduk";
import useSendData from "../../utils/useSendData";
import { Link } from "@reach/router";
......@@ -25,10 +24,6 @@ const TambahProduk = () => {
flex-direction: column;
`}
>
<div>
{error && <ErrorDiv>Error !, Data tidak dapat disimpan</ErrorDiv>}
</div>
<div
css={css`
font-style: normal;
......@@ -49,7 +44,7 @@ const TambahProduk = () => {
TAMBAH PRODUK
</div>
</div>
<FormProduk {...{ onSubmit }} />
<FormProduk {...{ onSubmit, 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