Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL Sosial
pilar
pilar-web
Commits
90f747d0
Commit
90f747d0
authored
Jun 07, 2021
by
FadhilP
Browse files
[REFACTOR] Fix EditProduk layout bug
parent
3c23a301
Pipeline
#82076
passed with stages
in 3 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/page/produk/EditProduk.jsx
View file @
90f747d0
...
...
@@ -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
>
)
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment