Skip to content

Commit 77e78b2

Browse files
committed
fix: 카테고리가 단 하나일 시, 카테고리 목록 노출 제거
1 parent 6eae48e commit 77e78b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ const SessionItem: React.FC<{ session: BackendAPISchemas.SessionSchema }> = Susp
4848

4949
type SessionListPropType = {
5050
event?: string;
51-
types?: string[];
51+
types?: string | string[];
5252
};
5353

5454
export const SessionList: React.FC<SessionListPropType> = ErrorBoundary.with(
5555
{ fallback: ErrorFallback },
5656
Suspense.with({ fallback: <CircularProgress /> }, ({ event, types }) => {
5757
const { language } = Hooks.Common.useCommonContext();
5858
const backendAPIClient = Hooks.BackendAPI.useBackendClient();
59-
const params = { ...(event && { event }), ...(types && { types: types.join(",") }) };
59+
const params = { ...(event && { event }), ...(types && { types: R.isString(types) ? types : types.join(",") }) };
6060
const { data: sessions } = Hooks.BackendAPI.useSessionsQuery(backendAPIClient, params);
6161

6262
const warningMessage =
@@ -86,7 +86,7 @@ export const SessionList: React.FC<SessionListPropType> = ErrorBoundary.with(
8686
<Box>
8787
<Typography variant="body2" sx={{ width: "100%", textAlign: "right", my: 0.5, fontSize: "0.6rem" }} children={warningMessage} />
8888
<StyledDivider />
89-
{categories && (
89+
{categories && categories.length > 1 && (
9090
<>
9191
<Stack direction="row" sx={{ flexWrap: "wrap", justifyContent: "center", gap: "0.1rem 0.2rem", my: 1 }}>
9292
{categories.map((cat) => (

0 commit comments

Comments
 (0)