Fakultas Ilmu Komputer UI

Commit 90f747d0 authored by FadhilP's avatar FadhilP
Browse files

[REFACTOR] Fix EditProduk layout bug

parent 3c23a301
Pipeline #82076 passed with stages
in 3 minutes and 38 seconds
......@@ -15,9 +15,9 @@ const EditProduk = ({ productId }) => {
const onSubmit = (data) => {
send(data);
};
return (
<Fragment>
{errorState || Object.keys(initialData.length === 0) ? (<div
if (errorState || Object.keys(initialData).length === 0) {
return (
<div
data-testid="waiting-edit-produk"
css={css`
display: flex;
......@@ -27,7 +27,12 @@ const EditProduk = ({ productId }) => {
`}
>
Fetching data..
</div>) : (<div
</div>
)
}
return (
<Fragment>
<div
data-testid="edit-produk"
css={css`
display: flex;
......@@ -81,7 +86,7 @@ const EditProduk = ({ productId }) => {
</div>
</div>
<FormProduk {...{ onSubmit, initialData, error }} />
</div>)}
</div>
</Fragment>
)
};
......
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