Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fundamentals/today-i-learned/src/api/remote/discussions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export async function fetchInfiniteDiscussions({
first,
after: after || null,
orderBy: getOrderBy(sortBy),
categoryId: CATEGORY_ID.TODAY_I_LEARNED
categoryId
},
accessToken
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { useParams } from "react-router-dom";
import { ContentBody } from "./ContentBody";
import { CommentInput } from "./CommentInput";
import { CommentsSection } from "./CommentsSection";
import { invariant } from "es-toolkit";

export function PostDetail() {
const { id } = useParams<{ id: string }>();

invariant(id != null, "๊ฒŒ์‹œ๋ฌผ์ด ์กด์žฌํ•˜์ง€ ์•Š์•„์š”.");
if (!id) {
throw new Error("๊ฒŒ์‹œ๋ฌผ์ด ์กด์žฌํ•˜์ง€ ์•Š์•„์š”.");
}

const { data: discussionDetail } = useDiscussionDetail(id);
const comments = discussionDetail?.comments?.nodes || [];
Expand Down
2 changes: 1 addition & 1 deletion fundamentals/today-i-learned/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OverlayProvider } from "overlay-kit";
import React from "react";
import ReactDOM from "react-dom/client";
import { createBrowserRouter, Outlet, RouterProvider } from "react-router-dom";
import { createBrowserRouter, RouterProvider } from "react-router-dom";

import SearchPage from "./pages/search/SearchPage.tsx";
import { ErrorBoundary } from "./components/shared/ErrorBoundary.tsx";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function SearchContent({ query }: SearchContentProps) {
<div className={searchResultsContainer}>
<h1 className={searchResultsTitle}>"{query}" ๊ฒ€์ƒ‰ ๊ฒฐ๊ณผ</h1>
<div className={resultsWrapper}>
{new Array(3).fill().map((_, index) => (
{new Array(3).fill(null).map((_, index) => (
<div key={index} className={index < 2 ? skeletonWithMargin : ""}>
<PostCardSkeleton />
</div>
Expand Down