diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 45f6ff537..1d7d9aba5 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -1,11 +1,10 @@
-import { useContext } from 'react';
-import { Navigate, Route, Routes, useLocation } from 'react-router-dom';
+import { Navigate, Route, Routes } from 'react-router-dom';
import { css } from '@emotion/react';
import { PATH } from '@constants';
-import { LoginContext } from '@context/login/LoginProvider';
+import { useAuth } from '@hooks/useAuth';
import Footer from '@layout/footer/Footer';
import Header from '@layout/header/Header';
@@ -20,7 +19,7 @@ import MyStudyPage from '@pages/my-study-page/MyStudyPage';
import DetailPage from '@detail-page/DetailPage';
const App = () => {
- const { isLoggedIn } = useContext(LoginContext);
+ const { isLoggedIn } = useAuth();
return (
diff --git a/frontend/src/api/postJoiningStudy.ts b/frontend/src/api/postJoiningStudy.ts
new file mode 100644
index 000000000..3ca556513
--- /dev/null
+++ b/frontend/src/api/postJoiningStudy.ts
@@ -0,0 +1,8 @@
+import axiosInstance from '@api/axiosInstance';
+
+const postJoiningStudy = async (studyId: number) => {
+ const response = await axiosInstance.post(`/api/studies/${studyId}`);
+ return response.data;
+};
+
+export default postJoiningStudy;
diff --git a/frontend/src/api/postNewStudy.ts b/frontend/src/api/postNewStudy.ts
index 353a37109..cf66d2698 100644
--- a/frontend/src/api/postNewStudy.ts
+++ b/frontend/src/api/postNewStudy.ts
@@ -20,7 +20,7 @@ const postNewStudy = async (data: StudyDetailPostData) => {
`/api/studies`,
data,
);
- return response;
+ return response.data;
};
export default postNewStudy;
diff --git a/frontend/src/hooks/useAuth.ts b/frontend/src/hooks/useAuth.ts
index 17c1e4323..58c0cddd0 100644
--- a/frontend/src/hooks/useAuth.ts
+++ b/frontend/src/hooks/useAuth.ts
@@ -5,7 +5,7 @@ import { ACCESS_TOKEN_KEY } from '@constants';
import { LoginContext } from '@context/login/LoginProvider';
export const useAuth = () => {
- const { setIsLoggedIn } = useContext(LoginContext);
+ const { isLoggedIn, setIsLoggedIn } = useContext(LoginContext);
const login = (accesssToken: string) => {
window.sessionStorage.setItem(ACCESS_TOKEN_KEY, accesssToken);
@@ -17,5 +17,5 @@ export const useAuth = () => {
setIsLoggedIn(false);
};
- return { login, logout };
+ return { isLoggedIn, login, logout };
};
diff --git a/frontend/src/layout/header/Header.tsx b/frontend/src/layout/header/Header.tsx
index d57e3b4b7..e5a1d7611 100644
--- a/frontend/src/layout/header/Header.tsx
+++ b/frontend/src/layout/header/Header.tsx
@@ -7,7 +7,6 @@ import { PATH, PROFILE_IMAGE_URL } from '@constants';
import { useAuth } from '@hooks/useAuth';
-import { LoginContext } from '@context/login/LoginProvider';
import { SearchContext } from '@context/search/SearchProvider';
import * as S from '@layout/header/Header.style';
@@ -23,14 +22,13 @@ export type HeaderProps = {
};
const Header: React.FC
= ({ className }) => {
- const { isLoggedIn } = useContext(LoginContext);
const { setKeyword } = useContext(SearchContext);
const [openDropDownBox, setOpenDropDownBox] = useState(false);
const navigate = useNavigate();
- const { logout } = useAuth();
+ const { logout, isLoggedIn } = useAuth();
const handleKeywordSubmit = (e: React.FormEvent, inputName: string) => {
e.preventDefault();
diff --git a/frontend/src/layout/header/components/drop-down-box/DropDownBox.style.tsx b/frontend/src/layout/header/components/drop-down-box/DropDownBox.style.tsx
index d42c0fb76..e43d4dcdd 100644
--- a/frontend/src/layout/header/components/drop-down-box/DropDownBox.style.tsx
+++ b/frontend/src/layout/header/components/drop-down-box/DropDownBox.style.tsx
@@ -26,5 +26,16 @@ export const DropDownBox = styled.div {
+ const studyId = req.params.studyId;
+
+ return res(ctx.status(200));
+ }),
rest.get('/api/studies/:studyId/reviews', (req, res, ctx) => {
const size = req.url.searchParams.get('size');
if (size) {
diff --git a/frontend/src/mocks/studies.json b/frontend/src/mocks/studies.json
index 8d77ec662..43bd9b7fb 100644
--- a/frontend/src/mocks/studies.json
+++ b/frontend/src/mocks/studies.json
@@ -7,7 +7,7 @@
"thumbnail": "https://picsum.photos/id/28/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 28,
+ "currentMemberCount": 29,
"maxMemberCount": 33,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-10",
@@ -16,7 +16,7 @@
"owner": {
"id": 1,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -206,7 +206,7 @@
"thumbnail": "https://picsum.photos/id/27/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 8,
+ "currentMemberCount": 9,
"maxMemberCount": 19,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-03",
@@ -215,7 +215,7 @@
"owner": {
"id": 2,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -283,7 +283,7 @@
"thumbnail": "https://picsum.photos/id/35/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 31,
+ "currentMemberCount": 32,
"maxMemberCount": 39,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-29",
@@ -292,7 +292,7 @@
"owner": {
"id": 3,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -500,7 +500,7 @@
"thumbnail": "https://picsum.photos/id/31/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 23,
+ "currentMemberCount": 24,
"maxMemberCount": 23,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-12",
@@ -509,7 +509,7 @@
"owner": {
"id": 4,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -665,7 +665,7 @@
"thumbnail": "https://picsum.photos/id/83/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 12,
+ "currentMemberCount": 13,
"maxMemberCount": 37,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-27",
@@ -674,7 +674,7 @@
"owner": {
"id": 5,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -765,7 +765,7 @@
"thumbnail": "https://picsum.photos/id/25/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 25,
+ "currentMemberCount": 26,
"maxMemberCount": 36,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-28",
@@ -774,7 +774,7 @@
"owner": {
"id": 6,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -946,7 +946,7 @@
"thumbnail": "https://picsum.photos/id/60/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 21,
+ "currentMemberCount": 22,
"maxMemberCount": 36,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-14",
@@ -955,7 +955,7 @@
"owner": {
"id": 7,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -1120,7 +1120,7 @@
"thumbnail": "https://picsum.photos/id/4/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 25,
+ "currentMemberCount": 26,
"maxMemberCount": 26,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-24",
@@ -1348,7 +1348,7 @@
"thumbnail": "https://picsum.photos/id/17/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 26,
+ "currentMemberCount": 27,
"maxMemberCount": 38,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-21",
@@ -1576,7 +1576,7 @@
"thumbnail": "https://picsum.photos/id/88/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 39,
+ "currentMemberCount": 40,
"maxMemberCount": 39,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-16",
@@ -1906,7 +1906,7 @@
"thumbnail": "https://picsum.photos/id/52/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 10,
+ "currentMemberCount": 11,
"maxMemberCount": 34,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-12",
@@ -1915,7 +1915,7 @@
"owner": {
"id": 8,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -1994,7 +1994,7 @@
"thumbnail": "https://picsum.photos/id/41/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 38,
+ "currentMemberCount": 39,
"maxMemberCount": 38,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-18",
@@ -2003,7 +2003,7 @@
"owner": {
"id": 9,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -2082,7 +2082,7 @@
"thumbnail": "https://picsum.photos/id/91/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 14,
+ "currentMemberCount": 15,
"maxMemberCount": 25,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-05",
@@ -2091,7 +2091,7 @@
"owner": {
"id": 10,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -2198,7 +2198,7 @@
"thumbnail": "https://picsum.photos/id/71/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 19,
+ "currentMemberCount": 20,
"maxMemberCount": 28,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-23",
@@ -2207,7 +2207,7 @@
"owner": {
"id": 11,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -2340,7 +2340,7 @@
"thumbnail": "https://picsum.photos/id/35/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 29,
+ "currentMemberCount": 30,
"maxMemberCount": 30,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-06",
@@ -2349,7 +2349,7 @@
"owner": {
"id": 12,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -2574,7 +2574,7 @@
"thumbnail": "https://picsum.photos/id/12/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 4,
+ "currentMemberCount": 5,
"maxMemberCount": 34,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-18",
@@ -2646,7 +2646,7 @@
"thumbnail": "https://picsum.photos/id/81/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 22,
+ "currentMemberCount": 23,
"maxMemberCount": 35,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-31",
@@ -2814,7 +2814,7 @@
"thumbnail": "https://picsum.photos/id/74/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 35,
+ "currentMemberCount": 36,
"maxMemberCount": 38,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-20",
@@ -2823,7 +2823,7 @@
"owner": {
"id": 13,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -3056,7 +3056,7 @@
"thumbnail": "https://picsum.photos/id/65/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 11,
+ "currentMemberCount": 12,
"maxMemberCount": 37,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-06",
@@ -3065,7 +3065,7 @@
"owner": {
"id": 14,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -3144,7 +3144,7 @@
"thumbnail": "https://picsum.photos/id/13/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 12,
+ "currentMemberCount": 13,
"maxMemberCount": 14,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-13",
@@ -3153,7 +3153,7 @@
"owner": {
"id": 15,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -3306,8 +3306,8 @@
"thumbnail": "https://picsum.photos/id/51/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 38,
- "maxMemberCount": 38,
+ "currentMemberCount": 39,
+ "maxMemberCount": 39,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-30",
"startDate": "2022-07-18",
@@ -3315,7 +3315,7 @@
"owner": {
"id": 16,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -3567,7 +3567,7 @@
"thumbnail": "https://picsum.photos/id/5/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 10,
+ "currentMemberCount": 11,
"maxMemberCount": 22,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-03",
@@ -3576,7 +3576,7 @@
"owner": {
"id": 17,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -3631,7 +3631,7 @@
"thumbnail": "https://picsum.photos/id/74/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 36,
+ "currentMemberCount": 37,
"maxMemberCount": 39,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-03",
@@ -3895,7 +3895,7 @@
"thumbnail": "https://picsum.photos/id/43/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 6,
+ "currentMemberCount": 7,
"maxMemberCount": 40,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-07",
@@ -3997,7 +3997,7 @@
"thumbnail": "https://picsum.photos/id/8/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 33,
+ "currentMemberCount": 34,
"maxMemberCount": 40,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-15",
@@ -4273,7 +4273,7 @@
"thumbnail": "https://picsum.photos/id/45/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 10,
+ "currentMemberCount": 11,
"maxMemberCount": 26,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-24",
@@ -4393,7 +4393,7 @@
"thumbnail": "https://picsum.photos/id/27/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 6,
+ "currentMemberCount": 7,
"maxMemberCount": 19,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-15",
@@ -4402,7 +4402,7 @@
"owner": {
"id": 18,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -4602,7 +4602,7 @@
"thumbnail": "https://picsum.photos/id/17/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 32,
+ "currentMemberCount": 33,
"maxMemberCount": 37,
"createdAt": "2022-07-09",
"enrollmentEndDate": "2022-07-05",
@@ -4611,7 +4611,7 @@
"owner": {
"id": 19,
"username": "jaejae-yoo",
- "imageUrl": "images/123",
+ "imageUrl": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80",
"profileUrl": "https://github.com/user/jaejae-yoo"
},
"members": [
@@ -4854,7 +4854,7 @@
"thumbnail": "https://picsum.photos/id/54/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 20,
+ "currentMemberCount": 21,
"maxMemberCount": 24,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-10",
@@ -5058,7 +5058,7 @@
"thumbnail": "https://picsum.photos/id/59/200/300",
"recruitmentStatus": "RECRUITMENT_END",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 12,
+ "currentMemberCount": 13,
"maxMemberCount": 28,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-13",
@@ -5208,7 +5208,7 @@
"thumbnail": "https://picsum.photos/id/27/200/300",
"recruitmentStatus": "RECRUITMENT_START",
"description": "# Prettier plugin sort imports\n\nA prettier plugin to sort import declarations by provided Regular Expression order.\n\n**Note: If you are migrating from v2.x.x to v3.x.x, [Please Read Migration Guidelines](./docs/MIGRATION.md)**\n\n### Input\n\n```javascript\nimport React, {\n FC,\n useEffect,\n useRef,\n ChangeEvent,\n KeyboardEvent,\n} from \"react\";\nimport { logger } from \"@core/logger\";\nimport { reduce, debounce } from \"lodash\";\nimport { Message } from \"../Message\";\nimport { createServer } from \"@server/node\";\nimport { Alert } from \"@ui/Alert\";\nimport { repeat, filter, add } from \"../utils\";\nimport { initializeApp } from \"@core/app\";\nimport { Popup } from \"@ui/Popup\";\nimport { createConnection } from \"@server/database\";\n```\n\n### Output\n\n```javascript\nimport { debounce, reduce } from \"lodash\";\nimport React, {\n ChangeEvent,\n FC,\n KeyboardEvent,\n useEffect,\n useRef,\n} from \"react\";\n\nimport { createConnection } from \"@server/database\";\nimport { createServer } from \"@server/node\";\n\nimport { initializeApp } from \"@core/app\";\nimport { logger } from \"@core/logger\";\n\nimport { Alert } from \"@ui/Alert\";\nimport { Popup } from \"@ui/Popup\";\n\nimport { Message } from \"../Message\";\nimport { add, filter, repeat } from \"../utils\";\n```\n",
- "currentMemberCount": 27,
+ "currentMemberCount": 28,
"maxMemberCount": 38,
"createdAt": "2022-07-21",
"enrollmentEndDate": "2022-07-09",
diff --git a/frontend/src/pages/detail-page/DetailPage.tsx b/frontend/src/pages/detail-page/DetailPage.tsx
index dd2a12f3b..443d4a9e4 100644
--- a/frontend/src/pages/detail-page/DetailPage.tsx
+++ b/frontend/src/pages/detail-page/DetailPage.tsx
@@ -1,7 +1,15 @@
-import { useParams } from 'react-router-dom';
+import { AxiosResponse } from 'axios';
+import { useMutation } from 'react-query';
+import { Navigate, useParams } from 'react-router-dom';
+
+import { PATH } from '@constants';
import { changeDateSeperator } from '@utils/dates';
+import postJoiningStudy from '@api/postJoiningStudy';
+
+import { useAuth } from '@hooks/useAuth';
+
import StudyMemberSection from '@pages/detail-page/components/study-member-section/StudyMemberSection';
import StudyWideFloatBox from '@pages/detail-page/components/study-wide-float-box/StudyWideFloatBox';
@@ -18,12 +26,33 @@ import useFetchDetail from '@detail-page/hooks/useFetchDetail';
const DetailPage = () => {
const { studyId } = useParams() as { studyId: string };
+ const { isLoggedIn } = useAuth();
+
const studyDetailQueryResult = useFetchDetail(Number(studyId));
+ const { mutate } = useMutation(postJoiningStudy);
+
+ const handleRegisterBtnClick = () => {
+ if (!isLoggedIn) {
+ alert('로그인이 필요합니다.');
+ return;
+ }
- const handleRegisterBtnClick = (studyId: number) => () => {
- alert('아직 준비중입니다 :D');
+ mutate(Number(studyId), {
+ onError: () => {
+ alert('가입에 실패했습니다.');
+ },
+ onSuccess: () => {
+ alert('가입했습니다 :D');
+ studyDetailQueryResult.refetch();
+ },
+ });
};
+ if (!studyId) {
+ alert('잘못된 접근입니다.');
+ return ;
+ }
+
if (studyDetailQueryResult.isFetching) return Loading...
;
if (!studyDetailQueryResult.data) return No Data
;
@@ -62,12 +91,11 @@ const DetailPage = () => {
-
+
{
& {
- studyId: number;
ownerName: string;
- handleRegisterBtnClick: (studyId: number) => React.MouseEventHandler;
+ handleRegisterBtnClick: React.MouseEventHandler;
};
const StudyFloatBox: React.FC = ({
- studyId,
enrollmentEndDate,
currentMemberCount,
maxMemberCount,
@@ -51,7 +48,7 @@ const StudyFloatBox: React.FC = ({
{ownerName}
-
diff --git a/frontend/src/pages/login-redirect-page/LoginRedirectPage.tsx b/frontend/src/pages/login-redirect-page/LoginRedirectPage.tsx
index f90fcfaf6..269714e6b 100644
--- a/frontend/src/pages/login-redirect-page/LoginRedirectPage.tsx
+++ b/frontend/src/pages/login-redirect-page/LoginRedirectPage.tsx
@@ -1,6 +1,8 @@
import { useEffect } from 'react';
import { useMutation } from 'react-query';
-import { Navigate, useSearchParams } from 'react-router-dom';
+import { useNavigate, useSearchParams } from 'react-router-dom';
+
+import { PATH } from '@constants';
import type { TokenQueryData } from '@custom-types/index';
@@ -13,34 +15,30 @@ import Wrapper from '@components/wrapper/Wrapper';
const LoginRedirectPage: React.FC = () => {
const [searchParams] = useSearchParams();
const codeParam = searchParams.get('code') as string;
+ const navigate = useNavigate();
const { login } = useAuth();
- const { data, mutate, isSuccess, isError, error } = useMutation(getAccessToken);
-
- useEffect(() => {
- mutate(codeParam);
- }, []);
+ const { mutate } = useMutation(getAccessToken);
useEffect(() => {
- if (isSuccess) {
- login(data.token);
+ if (!codeParam) {
+ alert('잘못된 접근입니다.');
+ navigate(PATH.MAIN, { replace: true });
+ return;
}
- }, [isSuccess]);
- if (!codeParam) {
- alert('잘못된 접근입니다.');
- return ;
- }
-
- if (isError) {
- alert(error.message);
- return ;
- }
-
- if (isSuccess) {
- return ;
- }
+ mutate(codeParam, {
+ onError: error => {
+ alert(error.message ?? '로그인에 실패했습니다.');
+ navigate(PATH.MAIN, { replace: true });
+ },
+ onSuccess: data => {
+ login(data.token);
+ navigate(PATH.MAIN, { replace: true });
+ },
+ });
+ }, []);
return (
diff --git a/frontend/src/pages/main-page/MainPage.tsx b/frontend/src/pages/main-page/MainPage.tsx
index af815bc39..24adc9d6d 100644
--- a/frontend/src/pages/main-page/MainPage.tsx
+++ b/frontend/src/pages/main-page/MainPage.tsx
@@ -8,7 +8,8 @@ import type { Study, StudyListQueryData, TagInfo } from '@custom-types/index';
import { getStudyList } from '@api/getStudyList';
-import { LoginContext } from '@context/login/LoginProvider';
+import { useAuth } from '@hooks/useAuth';
+
import { SearchContext } from '@context/search/SearchProvider';
import * as S from '@pages/main-page/MainPage.style';
@@ -30,8 +31,9 @@ const defaultParam = {
};
const MainPage: React.FC = () => {
- const { isLoggedIn } = useContext(LoginContext);
+ const { isLoggedIn } = useAuth();
const { keyword } = useContext(SearchContext);
+
const [selectedFilters, setSelectedFilters] = useState>([]);
const navigate = useNavigate();
diff --git a/frontend/src/pages/main-page/components/create-new-study-button/CreateNewStudyButton.style.tsx b/frontend/src/pages/main-page/components/create-new-study-button/CreateNewStudyButton.style.tsx
index 0203e2734..e2bdc48e9 100644
--- a/frontend/src/pages/main-page/components/create-new-study-button/CreateNewStudyButton.style.tsx
+++ b/frontend/src/pages/main-page/components/create-new-study-button/CreateNewStudyButton.style.tsx
@@ -16,6 +16,7 @@ export const CreateNewStudyButton = styled.button`
padding: 8px;
border-radius: 50%;
+ border: none;
background-color: ${theme.colors.primary.base};
&:hover {
diff --git a/frontend/src/styles/theme.ts b/frontend/src/styles/theme.ts
index 491911c53..960bd25f5 100644
--- a/frontend/src/styles/theme.ts
+++ b/frontend/src/styles/theme.ts
@@ -1,6 +1,5 @@
-export interface Theme {}
-
export const COLORS = {
+ YELLOW200: '#FFD54F',
BLUE100: '#534bae',
BLUE200: '#1a237e',
BLUE300: '#000051',
@@ -23,6 +22,9 @@ export const theme = {
light: COLORS.GRAY100,
dark: COLORS.GRAY300,
},
+ tertiary: {
+ base: COLORS.YELLOW200,
+ },
white: COLORS.WHITE,
black: COLORS.BLACK,
},