Fakultas Ilmu Komputer UI

Commit d1b21d63 authored by FadhilP's avatar FadhilP
Browse files

[REFACTOR] Reallocate error

parent 6e3f46d8
import React from "react";
import useFetchSingleData from "../../utils/useFetchSingleData";
import { css } from "@emotion/core";
import { ErrorDiv } from "../../component/html/html";
import FormKategori from "./FormKategori";
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
import ErrorOutlineIcon from "@material-ui/icons/ErrorOutline";
......@@ -41,7 +40,6 @@ const EditKategori = ({ idKategori }) => {
flex-direction: column;
`}
>
{error && <ErrorDiv>Error !, Data tidak dapat disimpan</ErrorDiv>}
<div
css={css`
display: flex;
......@@ -86,7 +84,7 @@ const EditKategori = ({ idKategori }) => {
Informasi Kategori
</div>
</div>
<FormKategori {...{ onSubmit, initialData }} />
<FormKategori {...{ 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