-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(member): 라이브러리 새로운 프로젝트 구조 적용 (#238)
- Loading branch information
Showing
20 changed files
with
194 additions
and
160 deletions.
There are no files selected for viewing
36 changes: 23 additions & 13 deletions
36
apps/member/src/components/common/ErrorSection/ErrorSection.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
37 changes: 0 additions & 37 deletions
37
apps/member/src/components/library/LibraryBooksSection/LibraryBooksSection.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
apps/member/src/pages/LibraryDetailPage/LibraryDetailPage.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Suspense } from 'react'; | ||
import { useParams } from 'react-router-dom'; | ||
|
||
import { QueryErrorResetBoundary } from '@tanstack/react-query'; | ||
|
||
import Content from '@components/common/Content/Content'; | ||
import ErrorSection from '@components/common/ErrorSection/ErrorSection'; | ||
import Header from '@components/common/Header/Header'; | ||
|
||
import { LIBRARY_MESSAGE } from '@constants/message'; | ||
import { PATH, PATH_NAME } from '@constants/path'; | ||
import { ErrorBoundary } from '@suspensive/react'; | ||
|
||
import { DetailsSection } from './components/BookDetailSection'; | ||
import { LoanHistorySection } from './components/BookLoanHistorySection'; | ||
|
||
export default function LibraryDetailPage() { | ||
const { id } = useParams<{ id: string }>(); | ||
|
||
if (!id) { | ||
throw new Error(LIBRARY_MESSAGE.NO_BOOK); | ||
} | ||
|
||
return ( | ||
<QueryErrorResetBoundary> | ||
{({ reset }) => ( | ||
<ErrorBoundary | ||
onReset={reset} | ||
fallback={({ reset }) => <ErrorSection reset={reset} />} | ||
> | ||
<Content> | ||
<Header title={[PATH_NAME.LIBRARY]} path={[PATH.LIBRARY]} /> | ||
<Suspense> | ||
<DetailsSection paramsId={id} /> | ||
</Suspense> | ||
|
||
<Suspense> | ||
<LoanHistorySection paramsId={id} /> | ||
</Suspense> | ||
</Content> | ||
</ErrorBoundary> | ||
)} | ||
</QueryErrorResetBoundary> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.