Skip to content

Commit 3ce79c4

Browse files
committed
feat: 특정 카테고리명을 노출하지 않도록 수정
1 parent 1457cb5 commit 3ce79c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/common/src/components/mdx_components/session_list.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import { ErrorFallback } from "../error_handler";
1111
import { FallbackImage } from "../fallback_image";
1212
import { StyledDivider } from "./styled_divider";
1313

14+
const EXCLUDE_CATEGORIES = ["후원사"];
15+
1416
const SessionItem: React.FC<{ session: BackendAPISchemas.SessionSchema; enableLink?: boolean }> = Suspense.with(
1517
{ fallback: <CircularProgress /> },
1618
({ session, enableLink }) => {
@@ -86,7 +88,8 @@ export const SessionList: React.FC<SessionListPropType> = ErrorBoundary.with(
8688
sessions
8789
.map((s) => s.categories)
8890
.flat()
89-
.filter((o1, i, a) => a.findIndex((o2) => o2.id === o1.id) === i),
91+
.filter((o1, i, a) => a.findIndex((o2) => o2.id === o1.id) === i)
92+
.filter((cat) => !EXCLUDE_CATEGORIES.includes(cat.name)),
9093
[sessions]
9194
);
9295
const filteredSessions = React.useMemo(() => {

0 commit comments

Comments
 (0)