diff --git a/frontend/src/api/session-list/getSessionList.ts b/frontend/src/api/session-list/getSessionList.ts
index ecdce0e7..add61622 100644
--- a/frontend/src/api/session-list/getSessionList.ts
+++ b/frontend/src/api/session-list/getSessionList.ts
@@ -2,11 +2,11 @@ import { api } from "@/api/config/axios.ts";
import { Session } from "@/pages/SessionListPage/types/session";
interface GetSessionListRequest {
- inProgress: 0 | 1;
+ inProgress: boolean;
}
export const getSessionList = async ({
- inProgress = 0,
+ inProgress = false,
}: GetSessionListRequest): Promise => {
const response = await api.get("api/rooms", {
params: {
diff --git a/frontend/src/components/common/Animate/NotFound.tsx b/frontend/src/components/common/Animate/NotFound.tsx
index 2e515c02..5349d149 100644
--- a/frontend/src/components/common/Animate/NotFound.tsx
+++ b/frontend/src/components/common/Animate/NotFound.tsx
@@ -20,7 +20,9 @@ const NotFound = ({ message, className, redirect }: NotFoundProps) => {
style={{ width: 200 }}
className={"dark:invert"}
/>
- {message}
+
+ {message?.split("\n").map(text => (
{text}
))}
+
{redirect && (
{
- const [currentTab, setCurrentTab] = useState<0 | 1>(0);
+ const [currentTab, setCurrentTab] = useState(false);
const [_, setSelectedCategory] = useState("전체");
const {
data: sessionList,
@@ -44,10 +44,10 @@ const SessionListPage = () => {
-
+
diff --git a/frontend/src/pages/SessionListPage/api/useGetSessionList.ts b/frontend/src/pages/SessionListPage/api/useGetSessionList.ts
index 18f5c94b..d4c3f5ea 100644
--- a/frontend/src/pages/SessionListPage/api/useGetSessionList.ts
+++ b/frontend/src/pages/SessionListPage/api/useGetSessionList.ts
@@ -2,7 +2,7 @@ import { useQuery } from "@tanstack/react-query";
import { getSessionList } from "@/api/session-list/getSessionList.ts";
interface SessionListRequest {
- inProgress: 0 | 1;
+ inProgress: boolean;
}
export const useGetSessionList = ({ inProgress }: SessionListRequest) => {
diff --git a/frontend/src/pages/SessionListPage/view/SessionList.tsx b/frontend/src/pages/SessionListPage/view/SessionList.tsx
index c49b92ec..9f863f28 100644
--- a/frontend/src/pages/SessionListPage/view/SessionList.tsx
+++ b/frontend/src/pages/SessionListPage/view/SessionList.tsx
@@ -5,11 +5,12 @@ import type { Session } from "@/pages/SessionListPage/types/session";
import NotFound from "@components/common/Animate/NotFound.tsx";
interface SessionListProps {
+ inProgress: boolean;
listLoading: boolean;
sessionList: Session[];
}
-const SessionList = ({ listLoading, sessionList }: SessionListProps) => {
+const SessionList = ({ inProgress, listLoading, sessionList }: SessionListProps) => {
const toast = useToast();
const renderSessionList = () => {
return sessionList.map((session) => {
@@ -36,22 +37,21 @@ const SessionList = ({ listLoading, sessionList }: SessionListProps) => {
return (
{listLoading &&
}
-
- {!listLoading && sessionList.length <= 0 ? (
- -
-
-
- ) : (
- renderSessionList()
- )}
-
+ {!listLoading && sessionList.length <= 0 ? (
+
+
+
+ ) : (
+
+ {renderSessionList()}
+
+ )}
);
};
diff --git a/frontend/src/pages/SessionListPage/view/Tab.tsx b/frontend/src/pages/SessionListPage/view/Tab.tsx
index 119b8530..2535b379 100644
--- a/frontend/src/pages/SessionListPage/view/Tab.tsx
+++ b/frontend/src/pages/SessionListPage/view/Tab.tsx
@@ -1,14 +1,9 @@
interface TabProps {
- currentTab: 0 | 1;
- tabStatus: 0 | 1;
- setCurrentTab: React.Dispatch>;
+ currentTab: boolean;
+ tabStatus: boolean;
+ setCurrentTab: React.Dispatch>;
}
-const tabName = {
- 0: "공개된 세션",
- 1: "진행 중인 세션",
-};
-
const Tab = ({ currentTab, tabStatus, setCurrentTab }: TabProps) => {
return (