diff --git a/src/app/page.tsx b/src/app/page.tsx index 8c3e9ede..9099456f 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -57,7 +57,7 @@ const Home = () => { const [deadline, setDeadline] = useState(false); const [stack, setStack] = useState(""); const [position, setPosition] = useState(""); - const [mode, setMode] = useState(""); + const [mode, setMode] = useState("0"); const { isAuth } = useAuthStore(); const [isInitialRender, setIsInitialRender] = useState(true); const rankImageArray = [ @@ -210,7 +210,7 @@ const Home = () => { const setToInitialState = () => { setStack(""); setPosition(""); - setMode(""); + setMode("0"); setLike(false); setRecruit(true); }; @@ -294,6 +294,18 @@ const Home = () => { } }, []); + useEffect(() => { + const handleResize = () => { + setModalOpen(false); + }; + + window.addEventListener("resize", handleResize); + + return () => { + window.removeEventListener("resize", handleResize); + }; + }, []); + const bannerDefaultStyle = "duration-1500 absolute left-0 top-0 flex h-250 md:h-300 lg:h-350 w-full justify-center transition-opacity"; const bannerValidStyle = "opacity-100 transition-opacity ease-in"; @@ -708,102 +720,132 @@ const Home = () => { -
- ({ - value: stack.id.toString(), - label: stack.name, - }))} - onSelectedChange={(value) => - setStack(value.map((item) => item.label).join(",")) - } - className="w-220" - /> - ({ - value: position.name, - label: position.name, - }))} - onSelectedChange={(value) => - setPosition(value.map((item) => item.label).join(",")) - } - className="w-220" - /> - setMode(value)} - /> -
- {isAuth && ( +
+
+
+
+ 기술 스택 + ({ + value: stack.id.toString(), + label: stack.name, + }))} + onSelectedChange={(value) => + setStack(value.map((item) => item.label).join(",")) + } + className="w-300" + /> +
+
+ 모집 분야 + ({ + value: position.name, + label: position.name, + }))} + onSelectedChange={(value) => + setPosition(value.map((item) => item.label).join(",")) + } + className="w-300" + /> +
+ +
+ 진행 방식 +
+
setMode("0")} + > + 전체 +
+
setMode("offline")} + > + 오프라인 +
+
setMode("online")} + > + 온라인 +
+
setMode("both")} + > + 혼합 +
+
+
+
+ 모집 현황 +
+
+ +
+
+ +
+
+
+
+
+
+
- )} - {!isAuth && ( - - 로그인 - - } - /> - } - trigger={ - - } +
+
+
-
- -
-
- + 초기화 + +
diff --git a/src/constants/selectorItems.ts b/src/constants/selectorItems.ts index b98f2452..17ef42d5 100644 --- a/src/constants/selectorItems.ts +++ b/src/constants/selectorItems.ts @@ -16,6 +16,7 @@ export const steadyParticipantsLimit = [ ]; export const steadyRunningMethods = [ + { value: "0", label: "전체" }, { value: "OFFLINE", label: "오프라인" }, { value: "ONLINE", label: "온라인" }, { value: "BOTH", label: "혼합" }, diff --git a/src/services/steady/getSteadies.ts b/src/services/steady/getSteadies.ts index 37bc00f9..30c30c3f 100644 --- a/src/services/steady/getSteadies.ts +++ b/src/services/steady/getSteadies.ts @@ -19,7 +19,7 @@ const getSteadies = async ( }${keyword !== "" ? `&keyword=${keyword}` : ""}${ stack !== "" ? `&stack=${stack}` : "" }${position !== "" ? `&position=${position}` : ""}${ - mode !== "" ? `&steadyMode=${mode}` : "" + mode !== "0" ? `&steadyMode=${mode}` : "" }${recruit ? `&status=RECRUITING` : ""}${ deadline ? `&direction=asc&criteria=deadline` : "" }`,