Skip to content

Commit

Permalink
style: fallback UI 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
a-honey committed Dec 1, 2024
1 parent 3ac1b2f commit b5e44f1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/GNB/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Error = {
<Header />
<Nav />
<main className="mt-[50px] ml-[250px] p-[20px]">
<ErrorFallback />
<ErrorFallback message={"Error Message Example"} />
</main>
</MemoryRouter>
),
Expand Down
8 changes: 7 additions & 1 deletion src/components/fallback/Blank/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
export default function Blank() {
return <div>데이터가 없습니다.</div>;
return (
<div className="flex justify-center items-center bg-gray-100">
<div className="p-6 bg-white rounded-lg text-center text-xl">
데이터가 없습니다.
</div>
</div>
);
}
11 changes: 10 additions & 1 deletion src/components/fallback/ErrorFallback/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
type ErrorFallbackProps = { message?: string };

export default function ErrorFallback({ message }: ErrorFallbackProps) {
return <div>에러발생{message}</div>;
return (
<div className="flex justify-center items-center bg-gray-100">
<div className="flex flex-col items-center">
<div className="p-6 bg-white rounded-lg text-center text-xl">
에러가 발생했습니다
</div>
<div>{message}</div>
</div>
</div>
);
}
8 changes: 7 additions & 1 deletion src/components/fallback/LoadingFallback/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
export default function LoadingFallback() {
return <div>로딩중</div>;
return (
<div className="flex justify-center items-center bg-gray-100">
<div className="p-6 bg-white rounded-lg text-center text-xl">
로딩중입니다
</div>
</div>
);
}

0 comments on commit b5e44f1

Please sign in to comment.