Skip to content

Commit 07bf797

Browse files
authored
Merge branch 'develop' into feat/find-schedule
2 parents 13aa7c6 + 825d9f1 commit 07bf797

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+3065
-381
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
88

99
```shell
1010
# zero install을 위한 세팅을 해놓았으나, 만약 정상적으로 실행이 안될경우 install 진행할것.
11-
yarn
11+
yarn
1212

1313
yarn dev
14-
```
14+
```
15+
16+
## 기술 스택
17+
18+
<img src="https://img.shields.io/badge/nextjs-000000?style=for-the-badge&logo=nextdotjs&logoColor=white">
19+
<img src="https://img.shields.io/badge/typescript-3178C6?style=for-the-badge&logo=typescript&logoColor=white">
20+
<img src="https://img.shields.io/badge/tailwindcss-06B6D4?style=for-the-badge&logo=tailwindcss&logoColor=white">
21+
<img src="https://img.shields.io/badge/recoil-3578E5?style=for-the-badge&logo=recoil&logoColor=white">
22+
<img src="https://img.shields.io/badge/reactquery-FF4154?style=for-the-badge&logo=reactquery&logoColor=white">
23+
<img src="https://img.shields.io/badge/storybook-FF4785?style=for-the-badge&logo=storybook&logoColor=white">
24+
<br>

pages/_app.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import Confirm from "@shared/modal/Confirm";
66
import Modal from "@shared/modal/Modal";
77
import "@shared/styles/globals.css";
88

9-
if (process.env.NODE_ENV === "development" && process.env.MOCK === "true") {
9+
if (
10+
process.env.NEXT_PUBLIC_NODE_ENV === "development" &&
11+
process.env.NEXT_PUBLIC_MOCK === "true"
12+
) {
1013
import("mock");
1114
}
1215

@@ -15,9 +18,9 @@ function MyApp({ Component, pageProps }: AppProps) {
1518
<RecoilRoot>
1619
<Header />
1720
<Component {...pageProps} />
21+
<Modal />
1822
<Alert />
1923
<Confirm />
20-
<Modal />
2124
</RecoilRoot>
2225
);
2326
}

pages/api/mySchedule.ts

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
import axios from "axios";
2+
3+
export const getAllSchedule = async (
4+
tab?: string,
5+
title?: string,
6+
startDate?: Date,
7+
endDate?: Date,
8+
) => {
9+
let tabParam;
10+
11+
if (tab === "진행 예정") {
12+
tabParam = "proceed";
13+
} else if (tab === "진행중/완료 일정") {
14+
tabParam = "ongoing";
15+
}
16+
17+
return await axios.get(`${process.env.NEXT_PUBLIC_BASE_URL}/getAllSchedule`, {
18+
params: {
19+
tab: tabParam,
20+
title,
21+
startDate,
22+
endDate,
23+
},
24+
});
25+
};
26+
27+
export const getRecruitSchedule = async (
28+
tab?: string,
29+
title?: string,
30+
startDate?: Date,
31+
endDate?: Date,
32+
) => {
33+
let tabParam;
34+
35+
if (tab === "모집 중/예정") {
36+
tabParam = "proceed";
37+
} else if (tab === "모집 완료") {
38+
tabParam = "ongoing";
39+
}
40+
41+
return await axios.get(
42+
`${process.env.NEXT_PUBLIC_BASE_URL}/getRecruitSchedule`,
43+
{
44+
params: {
45+
tab: tabParam,
46+
title,
47+
startDate,
48+
endDate,
49+
},
50+
},
51+
);
52+
};
53+
54+
export const getParticipateSchedule = async (
55+
tab?: string,
56+
title?: string,
57+
startDate?: Date,
58+
endDate?: Date,
59+
) => {
60+
let tabParam = 0;
61+
62+
if (tab === "승인 대기 중") {
63+
tabParam = 1;
64+
} else if (tab === "승인 완료") {
65+
tabParam = 2;
66+
} else if (tab === "승인 거절") {
67+
tabParam = 3;
68+
}
69+
70+
return await axios.get(
71+
`${process.env.NEXT_PUBLIC_BASE_URL}/getParticipateSchedule`,
72+
{
73+
params: {
74+
tab: tabParam,
75+
title,
76+
startDate,
77+
endDate,
78+
},
79+
},
80+
);
81+
};
82+
83+
export const getScrapSchedule = async (
84+
title?: string,
85+
startDate?: Date,
86+
endDate?: Date,
87+
) => {
88+
return await axios.get(
89+
`${process.env.NEXT_PUBLIC_BASE_URL}/getScrapSchedule`,
90+
{
91+
params: {
92+
title,
93+
startDate,
94+
endDate,
95+
},
96+
},
97+
);
98+
};
99+
100+
export const getTemporarySchedule = async (
101+
title?: string,
102+
startDate?: Date,
103+
endDate?: Date,
104+
) => {
105+
return await axios.get(
106+
`${process.env.NEXT_PUBLIC_BASE_URL}/getTemporarySchedule`,
107+
{
108+
params: {
109+
title,
110+
startDate,
111+
endDate,
112+
},
113+
},
114+
);
115+
};
116+
117+
export const getMainSchedule = async () => {
118+
try {
119+
const response = await axios.all([
120+
getAllSchedule(),
121+
getRecruitSchedule(),
122+
getParticipateSchedule(),
123+
getTemporarySchedule(),
124+
]);
125+
126+
// axios.spread를 사용하여 각 요청의 결과를 개별적으로 처리
127+
const [
128+
allSchedule,
129+
recruitSchedule,
130+
participateSchedule,
131+
temporarySchedule,
132+
] = response;
133+
134+
// 각 요청의 데이터를 반환합니다.
135+
return {
136+
allSchedule: allSchedule.data,
137+
recruitSchedule: recruitSchedule.data,
138+
participateSchedule: participateSchedule.data,
139+
temporarySchedule: temporarySchedule.data,
140+
};
141+
} catch (error) {
142+
console.error("API 호출 중 오류 발생:", error);
143+
throw error; // 오류를 호출자에게 전달
144+
}
145+
};
146+
147+
export const getApplicantsList = async (id: number) => {
148+
return await axios.get(
149+
`${process.env.NEXT_PUBLIC_BASE_URL}/getApplicantsList`,
150+
{
151+
params: {
152+
id,
153+
},
154+
},
155+
);
156+
};
157+
158+
export const getItemList = async (title?: string) => {
159+
return await axios.get(`${process.env.NEXT_PUBLIC_BASE_URL}/getItemList`, {
160+
params: {
161+
title,
162+
},
163+
});
164+
};

pages/index.tsx

Lines changed: 48 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,59 @@
11
import type { NextPage } from "next";
2-
import Head from "next/head";
3-
import Image from "next/image";
4-
import styles from "@shared/styles/Home.module.css";
2+
import Link from "next/link";
53

64
const Home: NextPage = () => {
75
return (
8-
<div className={styles.container}>
9-
<Head>
10-
<title>Create Next App</title>
11-
<meta name="description" content="Generated by create next app" />
12-
<link rel="icon" href="/favicon.ico" />
13-
</Head>
14-
15-
<main className={styles.main}>
16-
<h1 className={styles.title}>
17-
Welcome to <a href="https://nextjs.org">Next.js!</a>
18-
</h1>
19-
<div className="pb-5">
20-
<p className="text-xl title">its title!</p>
6+
<>
7+
<div
8+
className="w-screen h-screen bg-gradient-to-b from-[#F85E9F] via-[#FFDED3] via-85% to-[#FFFFFF]
9+
"
10+
>
11+
<div className="flex flex-col items-center justify-center text-white pt-52">
12+
<h1 className="p-10 font-sans font-thin tracking-tighter text-8xl">
13+
일상의 행복을 <span className="font-bold">확대</span>하다
14+
</h1>
15+
<span className="text-4xl">
16+
<h3>왜, 나는 일정 만들기가 어려울까?</h3>
17+
<h3>일정을 바로 고르고 편집하는 캐쳐!</h3>
18+
</span>
2119
</div>
22-
<p className={styles.description}>
23-
Get started by editing{" "}
24-
<code className={styles.code}>pages/index.tsx</code>
25-
</p>
26-
27-
<div className={styles.grid}>
28-
<a href="https://nextjs.org/docs" className={styles.card}>
29-
<h2>Documentation &rarr;</h2>
30-
<p>Find in-depth information about Next.js features and API.</p>
31-
</a>
3220

33-
<a href="https://nextjs.org/learn" className={styles.card}>
34-
<h2>Learn &rarr;</h2>
35-
<p>Learn about Next.js in an interactive course with quizzes!</p>
36-
</a>
37-
<a
38-
href="https://github.com/vercel/next.js/tree/canary/examples"
39-
className={styles.card}
40-
>
41-
<h2>Examples &rarr;</h2>
42-
<p>Discover and deploy boilerplate example Next.js projects.</p>
43-
</a>
44-
45-
<a
46-
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
47-
className={styles.card}
48-
>
49-
<h2>Deploy &rarr;</h2>
50-
<p>
51-
Instantly deploy your Next.js site to a public URL with Vercel.
52-
</p>
53-
</a>
21+
<div className="top-[50%} absolute left-20 text-xl">
22+
<ul>index</ul>
23+
<li>
24+
<Link href={"/login"}>로그인</Link>
25+
</li>
26+
<li>
27+
<Link href={"/signup"}>회원가입</Link>
28+
</li>
29+
<li>
30+
<Link href={"/schedule"}>일정 찾기</Link>
31+
</li>
32+
<li>
33+
<Link href={"/create-schedule"}>일정 만들기</Link>
34+
</li>
35+
<li>
36+
<Link href={"/faq"}>자주하는 질문</Link>
37+
</li>
38+
<li>
39+
<Link href={"/notice"}>공지사항</Link>
40+
</li>
41+
<li>
42+
<Link href={"/mypage"}>마이페이지</Link>
43+
</li>
5444
</div>
55-
</main>
5645

57-
<footer className={styles.footer}>
58-
<a
59-
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
60-
target="_blank"
61-
rel="noopener noreferrer"
62-
>
63-
Powered by{" "}
64-
<span className={styles.logo}>
65-
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
66-
</span>
67-
</a>
68-
</footer>
69-
</div>
46+
<div className="absolute overflow-hidden bg-white rounded-full h-[50vw] w-[50vw] m-auto bottom-[-25vw] right-[25vw]">
47+
<video
48+
src="media/main_circle.mov"
49+
autoPlay={true}
50+
loop={true}
51+
muted={true}
52+
className="object-cover w-full h-full"
53+
></video>
54+
</div>
55+
</div>
56+
</>
7057
);
7158
};
7259

pages/schedule/all.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
//모든 일정 페이지
22
import All from "@schedule/components/All";
3+
import ScheduleWrapper from "@schedule/components/ScheduleWrapper";
34

45
const create = () => {
5-
return <All />;
6+
return (
7+
<ScheduleWrapper>
8+
<All />;
9+
</ScheduleWrapper>
10+
);
611
};
712

813
export default create;

pages/schedule/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
// 내 일정 페이지
22
import Main from "@schedule/components/Main";
3+
import ScheduleWrapper from "@schedule/components/ScheduleWrapper";
34
import React from "react";
45

56
const index = () => {
6-
return <Main />;
7+
return (
8+
<ScheduleWrapper>
9+
<Main />;
10+
</ScheduleWrapper>
11+
);
712
};
813

914
export default index;

pages/schedule/items.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Items from "@schedule/components/Items";
2+
import ScheduleWrapper from "@schedule/components/ScheduleWrapper";
3+
import React from "react";
4+
5+
const items = () => {
6+
return (
7+
<ScheduleWrapper>
8+
<Items />;
9+
</ScheduleWrapper>
10+
);
11+
};
12+
13+
export default items;

pages/schedule/participate.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import Participate from "@schedule/components/Participate";
2+
import ScheduleWrapper from "@schedule/components/ScheduleWrapper";
3+
import React from "react";
4+
5+
const participate = () => {
6+
return (
7+
<ScheduleWrapper>
8+
<Participate />;
9+
</ScheduleWrapper>
10+
);
11+
};
12+
13+
export default participate;

0 commit comments

Comments
 (0)