File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
fundamentals/today-i-learned/src
components/features/discussions/PostDetail Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ export async function fetchInfiniteDiscussions({
335335 first,
336336 after : after || null ,
337337 orderBy : getOrderBy ( sortBy ) ,
338- categoryId : CATEGORY_ID . TODAY_I_LEARNED
338+ categoryId
339339 } ,
340340 accessToken
341341 ) ;
Original file line number Diff line number Diff line change @@ -4,12 +4,13 @@ import { useParams } from "react-router-dom";
44import { ContentBody } from "./ContentBody" ;
55import { CommentInput } from "./CommentInput" ;
66import { CommentsSection } from "./CommentsSection" ;
7- import { invariant } from "es-toolkit" ;
87
98export function PostDetail ( ) {
109 const { id } = useParams < { id : string } > ( ) ;
1110
12- invariant ( id != null , "게시물이 존재하지 않아요." ) ;
11+ if ( ! id ) {
12+ throw new Error ( "게시물이 존재하지 않아요." ) ;
13+ }
1314
1415 const { data : discussionDetail } = useDiscussionDetail ( id ) ;
1516 const comments = discussionDetail ?. comments ?. nodes || [ ] ;
Original file line number Diff line number Diff line change 11import { OverlayProvider } from "overlay-kit" ;
22import React from "react" ;
33import ReactDOM from "react-dom/client" ;
4- import { createBrowserRouter , Outlet , RouterProvider } from "react-router-dom" ;
4+ import { createBrowserRouter , RouterProvider } from "react-router-dom" ;
55
66import SearchPage from "./pages/search/SearchPage.tsx" ;
77import { ErrorBoundary } from "./components/shared/ErrorBoundary.tsx" ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export function SearchContent({ query }: SearchContentProps) {
5555 < div className = { searchResultsContainer } >
5656 < h1 className = { searchResultsTitle } > "{ query } " 검색 결과</ h1 >
5757 < div className = { resultsWrapper } >
58- { new Array ( 3 ) . fill ( ) . map ( ( _ , index ) => (
58+ { new Array ( 3 ) . fill ( null ) . map ( ( _ , index ) => (
5959 < div key = { index } className = { index < 2 ? skeletonWithMargin : "" } >
6060 < PostCardSkeleton />
6161 </ div >
You can’t perform that action at this time.
0 commit comments