Skip to content

Commit

Permalink
✨feat: SearchContent.jsx - 에러 컴포넌트 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ShinHeeEul committed Jun 24, 2024
1 parent 1fd7014 commit 35f61ce
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pages/main/SearchContent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ export default function SearchContent({ keyword }) {
}
}, [stockData]);

if (error) return <div>Error loading data</div>;

return (
<StyledMainContentDiv>
<ContentHeader
Expand Down Expand Up @@ -143,7 +141,12 @@ export default function SearchContent({ keyword }) {
toLink="/main/social"
/>
<Contents>
{isLoading ? (
{error ? (
<img
style={{ width: "952px", height: "227px" }}
src="/assets/images/no-google-trends.svg"
></img>
) : isLoading ? (
<div width="600px" height="400px">
<ClipLoader color="#43d2ff"></ClipLoader>
</div>
Expand Down

0 comments on commit 35f61ce

Please sign in to comment.