- {test.map((_, index: number) => (
+ {BannerList.map((_, index: number) => (
diff --git a/src/components/Provider.tsx b/src/components/Provider.tsx
index 6664c0b..9962444 100644
--- a/src/components/Provider.tsx
+++ b/src/components/Provider.tsx
@@ -4,7 +4,6 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ToastContainer } from "@team-return/design-system";
import { CookiesProvider } from "react-cookie";
import SignupContextProvider from "./account/singup/ContextProvider";
-import ModalContainer from "./modal/ModalContainer";
import ModalContextProvider from "./modal/ModalContextProvider";
interface PropsType {
@@ -19,7 +18,6 @@ export default function Provider({ children }: PropsType) {
-
{children}
diff --git a/src/components/Suggestion.tsx b/src/components/Suggestion.tsx
index c011b73..dbb6927 100644
--- a/src/components/Suggestion.tsx
+++ b/src/components/Suggestion.tsx
@@ -1,17 +1,31 @@
-import CompanyCard from "./CompanyCard";
+import { useEffect } from "react";
+import BookmarkCard from "./BookmarkCard";
+import CompanyCard from "./company/CompanyCard";
import RecruitmentsCard from "./recruitments/RecruitmentsCard";
import SuggestionHeader from "./SuggestionHeader";
interface PropsType {
- listType: "Company" | "Recruitments" | "BookMark";
+ listType: "Company" | "Recruitments" | "Bookmark";
}
export default function Suggestion({ listType }: PropsType) {
+ function windowResize() {
+ console.log("resize");
+ }
+ useEffect(() => {
+ document.addEventListener(`resize`, windowResize);
+
+ return () => {
+ document.removeEventListener(`resize`, windowResize);
+ };
+ }, []);
+
return (
- {listType === "Company" && }
- {listType === "Recruitments" && }
+ {listType === "Company" && }
+ {listType === "Recruitments" && }
+ {listType === "Bookmark" && }
);
}
diff --git a/src/components/SuggestionHeader.tsx b/src/components/SuggestionHeader.tsx
index 6f39bc7..5a677f4 100644
--- a/src/components/SuggestionHeader.tsx
+++ b/src/components/SuggestionHeader.tsx
@@ -1,37 +1,44 @@
"use client";
import { Icon } from "@team-return/design-system";
-import { MyProfile } from "@/apis/students";
+import { useMyProfile } from "@/apis/students";
+import Link from "next/link";
interface PropsType {
- listType: "Company" | "Recruitments" | "BookMark";
+ listType: "Company" | "Recruitments" | "Bookmark";
}
export default function SuggestionHeader({ listType }: PropsType) {
- const { data } = MyProfile();
-
- const fix_data = {
+ const { data: profile } = useMyProfile();
+
+ const suggestionHeaderDummy = {
Company: {
title: "🏢 이런 기업은 어떠세요?",
- router: "/company",
+ router: "/companies",
},
Recruitments: {
- title: `👩💻 ${data?.data.student_name || '사용자'}님의 관심 분야에요`,
- router: "/recruitements",
+ title: `👩💻 ${profile?.student_name || "사용자"}님의 관심 분야에요`,
+
+ router: "/recruitments",
},
- BookMark: {
+ Bookmark: {
title: "📌 내가 저장한 모집의뢰서",
},
};
return (
);
}
diff --git a/src/components/account/login/loginStateManagement.tsx b/src/components/account/login/loginStateManagement.tsx
index 5d37bd3..2b4ec4e 100644
--- a/src/components/account/login/loginStateManagement.tsx
+++ b/src/components/account/login/loginStateManagement.tsx
@@ -5,7 +5,7 @@ import { RequestBody } from "@/apis/user/type";
import LoginInputs from "@/components/account/login/loginInputsComponents";
import SubmitBtn from "@/components/account/login/submitBtn";
import { useCallback, useState } from "react";
-import { Login } from "@/apis/user";
+import { useLogin } from "@/apis/user";
import useForm from "@/hook/useForm";
export default function LoginStateMenagement() {
@@ -14,7 +14,7 @@ export default function LoginStateMenagement() {
account_id: "",
password: "",
});
- const { mutate: loginClick } = Login(inputStates, isChecked);
+ const { mutate: loginClick } = useLogin(inputStates, isChecked);
const allIsInputState = useCallback(
(): boolean => inputStates.account_id !== "" && inputStates.password !== "",
[inputStates]
diff --git a/src/components/account/singup/signupPages/FirstSignupPage.tsx b/src/components/account/singup/signupPages/FirstSignupPage.tsx
index bdd6ee2..447a9de 100644
--- a/src/components/account/singup/signupPages/FirstSignupPage.tsx
+++ b/src/components/account/singup/signupPages/FirstSignupPage.tsx
@@ -1,6 +1,6 @@
"use client";
-import { CheckAuthCode, SendAuthCode } from "@/apis/auth";
+import { useCheckAuthCode, useSendAuthCode } from "@/apis/auth";
import LargeBtn from "@/components/common/Button/LargeBtn";
import TextFiled from "@/components/common/TextFiled";
import useSignUpContext from "@/hook/useSignupContext";
@@ -13,8 +13,8 @@ function FirstSignupPage() {
const { email, auth_code, password, passwordCheck } = signupState;
const { append } = useToastStore();
const navigator = useRouter();
- const { mutate: SandAuthCodeAPI } = SendAuthCode();
- const { mutate: CheckAuthCodeAPI } = CheckAuthCode(
+ const { mutate: SandAuthCodeAPI } = useSendAuthCode();
+ const { mutate: CheckAuthCodeAPI } = useCheckAuthCode(
{
email,
auth_code,
diff --git a/src/components/account/singup/signupPages/SecondSignupPage.tsx b/src/components/account/singup/signupPages/SecondSignupPage.tsx
index 8d24548..db7ada7 100644
--- a/src/components/account/singup/signupPages/SecondSignupPage.tsx
+++ b/src/components/account/singup/signupPages/SecondSignupPage.tsx
@@ -1,4 +1,4 @@
-import { Signup } from "@/apis/students";
+import { useSignup } from "@/apis/students";
import LargeBtn from "@/components/common/Button/LargeBtn";
import RadioBtn from "@/components/common/RadioBtn";
import TextFiled from "@/components/common/TextFiled";
@@ -16,7 +16,7 @@ function SecondSignupPage() {
setSignupState((prev) => ({ ...prev, ["gender"]: select }));
}, [select]);
- const { mutate } = Signup();
+ const { mutate } = useSignup();
const SignupAPI = () => {
const RequestBody = {
diff --git a/src/components/common/Button/FIleDownload.tsx b/src/components/common/Button/FIleDownload.tsx
new file mode 100644
index 0000000..4f05a22
--- /dev/null
+++ b/src/components/common/Button/FIleDownload.tsx
@@ -0,0 +1,26 @@
+import Link from "next/link";
+import { file_name_regex } from "@/util/regex";
+import { Icon } from "@team-return/design-system";
+
+interface PropsType {
+ fileURL: string;
+ onClick?: (props: any) => void;
+}
+
+export default function FileDownload({ fileURL, onClick }: PropsType) {
+ return (
+
+
+
+ {file_name_regex(fileURL)}
+
+
+
+
+ );
+}
diff --git a/src/components/common/Button/GhostBtn.tsx b/src/components/common/Button/GhostBtn.tsx
index dfb25ce..868b589 100644
--- a/src/components/common/Button/GhostBtn.tsx
+++ b/src/components/common/Button/GhostBtn.tsx
@@ -1,17 +1,35 @@
"use client";
-import React from "react";
+import React, { useEffect, useState } from "react";
interface PropsType {
children: React.ReactNode;
onClick?: () => void;
+ disabled?: boolean;
}
-function GhostBtn({ children, onClick }: PropsType) {
+function GhostBtn({ children, onClick, disabled = false }: PropsType) {
+ const [isHover, setIsHover] = useState
(false);
+
return (
diff --git a/src/components/common/Chips.tsx b/src/components/common/Chips.tsx
index b1dc358..467fde4 100644
--- a/src/components/common/Chips.tsx
+++ b/src/components/common/Chips.tsx
@@ -1,6 +1,6 @@
"use client";
-import { TechCodeResponensType } from "@/util/type";
+import { TechCodeResponensType } from "@/util/type/type";
import React from "react";
interface PropsType {
diff --git a/src/components/common/DropDown.tsx b/src/components/common/DropDown.tsx
index 9e43fa0..cf0e038 100644
--- a/src/components/common/DropDown.tsx
+++ b/src/components/common/DropDown.tsx
@@ -4,22 +4,19 @@ import { useDropDown } from "@/hook/useDropDown";
import { Icon } from "@team-return/design-system";
import React from "react";
-type DropDownItemsType = {
- code: number;
- keyword: string;
-};
+interface DropdownItemsType {
+ code: string;
+ label: string;
+}
interface PropsType {
title: string;
- items?: DropDownItemsType[];
- onItemClick: (
- itemCode: string | number,
- name: "job_code" | "tech_code"
- ) => void;
+ items: DropdownItemsType[];
+ onClickItem: (itemId: string) => void;
selected: number | string;
}
-function DropDown({ title, items, onItemClick, selected }: PropsType) {
+function DropDown({ title, items, onClickItem, selected }: PropsType) {
const { toggleDropdown, DropDownComponent, closeDropDown } = useDropDown();
return (
@@ -31,11 +28,11 @@ function DropDown({ title, items, onItemClick, selected }: PropsType) {
- {items?.map((item, index) => (
+ {items?.map((item, idx) => (
{
- onItemClick(item.code, "job_code");
+ onClickItem(item.code.toString());
closeDropDown();
}}
className={`text-caption leading-caption ${
@@ -44,7 +41,7 @@ function DropDown({ title, items, onItemClick, selected }: PropsType) {
: "text-[#7f7f7f] font-r"
} hover:text-black py-2 w-full flex flex-col items-center`}
>
- {item.keyword}
+ {item.label}
))}
diff --git a/src/components/common/Dropdown/Dropdown.tsx b/src/components/common/Dropdown/Dropdown.tsx
new file mode 100644
index 0000000..75d36bb
--- /dev/null
+++ b/src/components/common/Dropdown/Dropdown.tsx
@@ -0,0 +1,7 @@
+export default function Dropdown() {
+ return (
+ <>
+ <>>
+ >
+ );
+}
diff --git a/src/components/common/Dropdown/KebabMenu.tsx b/src/components/common/Dropdown/KebabMenu.tsx
new file mode 100644
index 0000000..6e5cf75
--- /dev/null
+++ b/src/components/common/Dropdown/KebabMenu.tsx
@@ -0,0 +1,34 @@
+"use client";
+
+import { useDropDown } from "@/hook/useDropDown";
+import { KebabItemType } from "@/util/type/kebabMenu";
+import { Icon } from "@team-return/design-system";
+
+interface PropsType {
+ items: KebabItemType[];
+}
+
+export default function KebabMenu({ items }: PropsType) {
+ const { DropDownComponent, toggleDropdown, closeDropDown } = useDropDown();
+ return (
+
+
+
+
+ {items.map(({ label, onClick }, idx) => (
+
{
+ onClick();
+ closeDropDown();
+ }}
+ >
+ {label}
+
+ ))}
+
+
+
+ );
+}
diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx
index 0968003..7fae175 100644
--- a/src/components/common/Header.tsx
+++ b/src/components/common/Header.tsx
@@ -6,7 +6,7 @@ import Logo from "@public/Logo.png";
import { Icon } from "@team-return/design-system";
import Link from "next/link";
import { usePathname } from "next/navigation";
-import { MyProfile } from "@/apis/students";
+import { useMyProfile } from "@/apis/students";
function Header() {
const pathname = usePathname();
@@ -14,7 +14,7 @@ function Header() {
return null;
}
- const profile = MyProfile();
+ const { data: profile } = useMyProfile();
return (
기업체
@@ -37,7 +37,7 @@ function Header() {
className={`text-[#333333] text-b2 ${
pathname.indexOf("/recruitments") !== -1 && "font-b"
}`}
- href={"/recruitments?page=1&job_code=&tech_code=&name="}
+ href={"/recruitments?page=1"}
>
모집의뢰서
@@ -56,25 +56,25 @@ function Header() {
//알림모달
}}
>
-
+
- {profile.data?.data.student_name}
+ {profile?.student_name}
-
+ {/* */}
diff --git a/src/components/common/Loading.tsx b/src/components/common/Loading.tsx
new file mode 100644
index 0000000..7fb8346
--- /dev/null
+++ b/src/components/common/Loading.tsx
@@ -0,0 +1,17 @@
+import LoadingImage from "@public/Loading.png";
+import Image from "next/image";
+
+interface PropsType {
+ size?: string;
+}
+
+export default function Loading({ size = "100px" }: PropsType) {
+ return (
+
+
+
+ );
+}
diff --git a/src/components/common/Logo.tsx b/src/components/common/Logo.tsx
new file mode 100644
index 0000000..d735fc1
--- /dev/null
+++ b/src/components/common/Logo.tsx
@@ -0,0 +1,26 @@
+import Image from "next/image";
+
+interface PropsType {
+ src: string;
+ width?: string;
+ height?: string;
+}
+
+export default function Logo({ src, width, height }: PropsType) {
+ return (
+
+
+
+ );
+}
diff --git a/src/components/common/Pagination.tsx b/src/components/common/Pagination.tsx
index aa3a282..21841d8 100644
--- a/src/components/common/Pagination.tsx
+++ b/src/components/common/Pagination.tsx
@@ -1,8 +1,9 @@
"use client";
-import { GetNumberOfCompaniesListPages } from "@/apis/companies";
-import { GetNumberOfRecruitmentRequestListPages } from "@/apis/recruitments";
-import { useQueryString } from "@/hook/useQueryString";
+import { useGetNumberOfCompaniesListPages } from "@/apis/companies";
+import { useGetNumberOfRecruitmentRequestListPages } from "@/apis/recruitments";
+import { RecruitmentsQueryType } from "@/hook/useQueryString/type";
+import { useQueryString } from "@/hook/useQueryString/useQueryString";
import { Icon, theme } from "@team-return/design-system";
import { usePathname } from "next/navigation";
import { useEffect, useState } from "react";
@@ -10,20 +11,30 @@ import { useEffect, useState } from "react";
export default function Pagination() {
const pathname = usePathname();
- const { setQueryString, getQueryString, getQueryStringEntry } = useQueryString({
- page: "1",
- job_code: "",
- tech_code: "",
- name: "",
- });
+ const { setQueryString, getQueryString, getQueryStringEntry } =
+ useQueryString({
+ page: "1",
+ job_code: "",
+ tech_code: "",
+ name: "",
+ winter_intern: "",
+ });
const currentPageNumber = getQueryString("page");
+ const recruitmentQuery = [
+ getQueryStringEntry("job_code"),
+ getQueryStringEntry("tech_code"),
+ getQueryStringEntry("name"),
+ getQueryStringEntry("winter_intern"),
+ ]
+ .filter((item) => item)
+ .join("&");
+
const numberOfPages =
pathname === "/recruitments/"
- ? GetNumberOfRecruitmentRequestListPages(
- `${getQueryStringEntry("job_code")}&${getQueryStringEntry("tech_code")}&${getQueryStringEntry("name")}`
- )?.data
- : GetNumberOfCompaniesListPages(`${getQueryStringEntry("name")}`)?.data;
+ ? useGetNumberOfRecruitmentRequestListPages(recruitmentQuery)?.data
+ : useGetNumberOfCompaniesListPages(`${getQueryStringEntry("name")}`)
+ ?.data;
const [pagesArray, setPagesArray] = useState([]);
useEffect(() => {
@@ -73,7 +84,11 @@ export default function Pagination() {
icon="Chevron"
direction="right"
size={16}
- color={getQueryString("page") === String(pagesArray.length) ? "gray50" : "gray90"}
+ color={
+ getQueryString("page") === String(pagesArray.length)
+ ? "gray50"
+ : "gray90"
+ }
/>