Skip to content

Commit

Permalink
feat: 에러 페이지 디자인 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yeolyi committed Mar 10, 2024
1 parent 84ee85d commit 3932615
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 30 deletions.
48 changes: 22 additions & 26 deletions app/[locale]/search/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,15 @@ const SearchResult = async ({ keyword }: { keyword: string }) => {
href={`${noticePath}?keyword=${keyword}`}
>
{renderSettled(notice, (notice) =>
notice.results
.slice(0, 2)
.map((notice) => (
<NoticeRow
{...notice}
key={notice.id}
id={notice.id}
title={notice.title}
dateStr={notice.createdAt}
/>
)),
notice.results.map((notice) => (
<NoticeRow
{...notice}
key={notice.id}
id={notice.id}
title={notice.title}
dateStr={notice.createdAt}
/>
)),
)}
</SubSection>

Expand All @@ -109,21 +107,19 @@ const SearchResult = async ({ keyword }: { keyword: string }) => {
href={`${newsPath}?keyword=${keyword}`}
>
{renderSettled(news, (news) =>
news.results
.slice(0, 2)
.map((news) => (
<NewsRow
key={news.id}
href={`${newsPath}/${news.id}`}
title={news.title}
description={news.partialDescription}
tags={news.tags}
date={new Date(news.date)}
imageURL={news.imageUrl}
descriptionBold={{ startIndex: news.boldStartIndex, endIndex: news.boldEndIndex }}
hideDivider
/>
)),
news.results.map((news) => (
<NewsRow
key={news.id}
href={`${newsPath}/${news.id}`}
title={news.title}
description={news.partialDescription}
tags={news.tags}
date={new Date(news.date)}
imageURL={news.imageUrl}
descriptionBold={{ startIndex: news.boldStartIndex, endIndex: news.boldEndIndex }}
hideDivider
/>
)),
)}
</SubSection>

Expand Down
8 changes: 4 additions & 4 deletions components/layout/ErrorFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

export default function ErrorFallback({ error }: { error: Error & { digest?: string } }) {
return (
<div className="mx-[3.75rem] mt-3 flex flex-col items-start">
<p className="mb-4">문제가 발생했습니다 :(</p>
<i>{error.message}</i>
<i className="mb-4">digest: {error.digest ?? '없음'}</i>
<div className="flex grow flex-col items-start justify-center p-12 text-base text-white">
<p className="mb-4">
{error.message} ({error.digest})
</p>
<button className="underline" onClick={() => location.reload()}>
새로고침
</button>
Expand Down

0 comments on commit 3932615

Please sign in to comment.