Fakultas Ilmu Komputer UI

Commit fa44dd86 authored by FadhilP's avatar FadhilP
Browse files

[REFACTOR] Reallocate error

parent 6c9d4e54
import React from "react";
import useFetchSingleData from "../../utils/useFetchSingleData";
import { css } from "@emotion/core";
import { ErrorDiv } from "../../component/html/html";
import FormProgram from "./FormProgram";
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
import ErrorOutlineIcon from "@material-ui/icons/ErrorOutline";
......@@ -40,7 +39,6 @@ const EditProgram = ({ idProgram }) => {
flex-direction: column;
`}
>
{error && <ErrorDiv>Error !, Data tidak dapat disimpan</ErrorDiv>}
<div
css={css`
display: flex;
......@@ -85,7 +83,7 @@ const EditProgram = ({ idProgram }) => {
Informasi Program
</div>
</div>
<FormProgram {...{ onSubmit, initialData }} />
<FormProgram {...{ 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