Skip to content

Commit

Permalink
Feat: #109 네트워크 통신 대기시 Spinner UI 노출
Browse files Browse the repository at this point in the history
  • Loading branch information
Seok93 committed Sep 5, 2024
1 parent cf631c8 commit bbcb385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/components/common/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
export default function Spinner() {
return <div className="box-border h-20 w-20 animate-spin rounded-full border-4 border-[#eee] border-t-main" />;
return (
<section className="flex h-full w-full items-center justify-center">
<div className="box-border h-20 w-20 animate-spin rounded-full border-4 border-[#eee] border-t-main" />
</section>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ export default function ModalProjectStatusForm({ formId, project, statusId, onSu
reset(initialValue);
}, [initialValue, reset]);

if (isStatusLoading) {
return (
<section className="flex grow items-center justify-center">
<Spinner />
</section>
);
}
if (isStatusLoading) return <Spinner />;

return (
<form id={formId} className="mb-10 flex grow flex-col justify-center" onSubmit={handleSubmit(onSubmit)}>
Expand Down

0 comments on commit bbcb385

Please sign in to comment.