diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index f9cb733..0000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "cSpell.words": [
- "Kakao",
- "signin",
- "signup"
- ]
-}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 9bd430d..880da2a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -76,7 +76,6 @@
"react-app-polyfill": "^3.0.0",
"react-chartjs-2": "^5.1.0",
"react-color": "^2.19.3",
- "react-cookie": "^7.0.2",
"react-countdown": "^2.3.5",
"react-dev-utils": "^12.0.1",
"react-dom": "^18.2.0",
@@ -4907,11 +4906,6 @@
"@types/node": "*"
}
},
- "node_modules/@types/cookie": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
- "integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="
- },
"node_modules/@types/eslint": {
"version": "8.4.10",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz",
@@ -4965,9 +4959,9 @@
}
},
"node_modules/@types/hoist-non-react-statics": {
- "version": "3.3.5",
- "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz",
- "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==",
+ "version": "3.3.4",
+ "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.4.tgz",
+ "integrity": "sha512-ZchYkbieA+7tnxwX/SCBySx9WwvWR8TaP5tb2jRAzwvLb/rWchGw3v0w3pqUbUvj0GCwW2Xz/AVPSk6kUGctXQ==",
"dependencies": {
"@types/react": "*",
"hoist-non-react-statics": "^3.3.0"
@@ -16595,19 +16589,6 @@
"react": "*"
}
},
- "node_modules/react-cookie": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/react-cookie/-/react-cookie-7.0.2.tgz",
- "integrity": "sha512-UnW1rZw1VibRdTvV8Ksr0BKKZoajeUxYLE89sIygDeyQgtz6ik89RHOM+3kib36G9M7HxheORggPoLk5DxAK7Q==",
- "dependencies": {
- "@types/hoist-non-react-statics": "^3.3.5",
- "hoist-non-react-statics": "^3.3.2",
- "universal-cookie": "^7.0.0"
- },
- "peerDependencies": {
- "react": ">= 16.3.0"
- }
- },
"node_modules/react-countdown": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/react-countdown/-/react-countdown-2.3.5.tgz",
@@ -19002,23 +18983,6 @@
"node": ">=8"
}
},
- "node_modules/universal-cookie": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/universal-cookie/-/universal-cookie-7.0.2.tgz",
- "integrity": "sha512-EC9PA+1nojhJtVnKW2Z7WYah01jgYJApqhX+Y8XU97TnFd7KaoxWTHiTZFtfpfV50jEF1L8V5p64ZxIx3Q67dg==",
- "dependencies": {
- "@types/cookie": "^0.6.0",
- "cookie": "^0.6.0"
- }
- },
- "node_modules/universal-cookie/node_modules/cookie": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz",
- "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==",
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/universalify": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
diff --git a/package.json b/package.json
index 76341db..0576bbc 100644
--- a/package.json
+++ b/package.json
@@ -70,7 +70,6 @@
"react-app-polyfill": "^3.0.0",
"react-chartjs-2": "^5.1.0",
"react-color": "^2.19.3",
- "react-cookie": "^7.0.2",
"react-countdown": "^2.3.5",
"react-dev-utils": "^12.0.1",
"react-dom": "^18.2.0",
diff --git a/src/App.tsx b/src/App.tsx
index bbe0590..1ca251f 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -22,66 +22,35 @@ import ResetPWMode from './pages/auth/resetPW/ResetPWMode';
import ResetPWStep from './pages/auth/resetPW/ResetPWSteps';
import AccountSetting from './pages/settings/AccountSetting';
import PopupMessage from './components/common/PopupMessage';
-import LoginRedirect from './pages/auth/login/LoginRedirect';
-import { CookiesProvider } from 'react-cookie';
function App() {
return (
-
-
-
-
- } />
- } />
- } />
- } />
- } />
-
- } />
- } />
-
-
-
-
- >
- }
- />
-
-
-
- >
- }
- />
-
-
-
- >
- }
- />
- } />
-
- } />
- } />
- } />
-
-
+
+
+
+ } />
+ } />
+ } />
+ } />
+
+ } />
+ } />
+
+ >} />
+ >} />
+ >} />
+ } />
+
+ } />
+ } />
+ } />
+
-
-
-
+
+
+
);
diff --git a/src/api/auth.ts b/src/api/auth.ts
index d0ca520..0aa2eaf 100644
--- a/src/api/auth.ts
+++ b/src/api/auth.ts
@@ -55,35 +55,6 @@ export const addUser = async (request: UserData) => {
/************************ SIGN IN ************************/
-/**
- * user sign in
- * @param request: UserData
- * @returns response
- */
-export const signIn = async (request: UserData) => {
- const response = await callAPI({
- url: '/api/v1/auth/signin',
- method: 'POST',
- body: request,
- });
-
- return response as CommonResponse;
-};
-
-/**
- * user social sign in
- * @param registrationId (google / naver / kakao)
- * @returns response
- */
-export const socialSignIn = async (registrationId: string) => {
- const response = await callAPI({
- url: `/api/oauth2/authorization/${registrationId}`,
- method: 'GET',
- });
-
- return response as CommonResponse;
-};
-
/************************ USER INFO ************************/
diff --git a/src/api/common/api.ts b/src/api/common/api.ts
index 70975f2..053adb2 100644
--- a/src/api/common/api.ts
+++ b/src/api/common/api.ts
@@ -1,20 +1,16 @@
import { Method } from 'axios';
import CommonResponse, { getInstance } from '../http';
-import { Cookies } from 'react-cookie';
export interface APIContract {
- headers?: any;
method: Method;
url: string;
params?: object;
body?: object;
}
-const cookies = new Cookies();
-
export const callAPI = async (
- { headers, url, method, params, body }: APIContract,
+ { url, method, params, body }: APIContract,
isLoading?: boolean,
): Promise => {
let response: CommonResponse = {
@@ -24,20 +20,16 @@ export const callAPI = async (
};
try {
- const request = {
- headers: {
- Authorization: `bearer ${cookies.get('accessToken')}`,
- },
+ response = await getInstance(isLoading).request({
url,
method,
params,
data: body,
- };
- response = await getInstance(isLoading).request(request);
+ });
} catch (error) {
response.data = error;
}
// return response as CommonResponse; 추후에 response 정해지면 any 대신 사용
return response as any;
-};
+};
\ No newline at end of file
diff --git a/src/icons/social/GoogleIcon.tsx b/src/components/auth/Google.tsx
similarity index 96%
rename from src/icons/social/GoogleIcon.tsx
rename to src/components/auth/Google.tsx
index ef1116c..ea5beef 100644
--- a/src/icons/social/GoogleIcon.tsx
+++ b/src/components/auth/Google.tsx
@@ -1,4 +1,4 @@
-const GoogleIcon = () => {
+const Naver = () => {
return (