Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: 로그인/회원가입 기능 구현 #6

Merged
merged 9 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,8 @@ sketch
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/react,macos,visualstudiocode
# End of https://www.toptal.com/developers/gitignore/api/react,macos,visualstudiocode


# 환경 변수 파일
.env
223 changes: 70 additions & 153 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@react-oauth/google": "^0.12.1",
"@reduxjs/toolkit": "^2.2.6",
"@tanstack/react-query": "^5.51.1",
"@tanstack/react-query": "^5.51.11",
"@tanstack/react-query-devtools": "^5.51.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
Expand All @@ -15,12 +16,15 @@
"react-redux": "^9.1.2",
"react-router-dom": "^6.24.1",
"react-scripts": "5.0.1",
"recoil": "^0.7.7",
"redux": "^5.0.1",
"styled-components": "^6.1.11",
"styled-components": "^6.1.12",
"styled-reset": "^4.5.2",
"web-vitals": "^2.1.4"
},
"scripts": {
"format": "prettier --write .",
"lint": "eslint .",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
Expand All @@ -45,6 +49,7 @@
]
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.3.3"
Expand Down
19 changes: 19 additions & 0 deletions public/favicon.ico
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server {
listen 80;
server_name moodfriend.site;

location / {
root /path/to/your/site;
index index.html index.htm;
}

location = /favicon.ico {
root /path/to/your/site/public;
}

location / {
try_files $uri /index.html;
}

# 다른 설정들...
}
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
<link rel="icon" href="/favicon.ico" />
<!-- 리셋 css 추가 -->
<link rel="stylesheet" href="%PUBLIC_URL%/reset.css" />
<link rel="stylesheet" href="/reset.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<title>React App</title>
Expand Down
8 changes: 8 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import GlobalStyle from "./styles/GlobalStyle";
import Login from "./pages/auth/Login";
import KakaoLogin from "./pages/auth/KakaoLogin";
import GoogleLogin from "./pages/auth/GoogleLogin";
import Signup from "./pages/auth/Signup";
import { Main } from "./pages/Main";
import Chat from "./pages/chat/Chat";
import Friends from "./pages/friends/Friends";
Expand All @@ -13,6 +17,10 @@ function App() {
<Router>
<GlobalStyle />
<Routes>
<Route path="/auth/login" element={<Login />} />
<Route path="/auth/callback/kakao" element={<KakaoLogin />} />
<Route path="/auth/callback/google" element={<GoogleLogin />} />
<Route path="/auth/signUp" element={<Signup />} />
<Route path="/" element={<Main />} />
<Route path="/chat" element={<Chat />} />
<Route path="/friends" element={<Friends />} />
Expand Down
4 changes: 4 additions & 0 deletions src/api/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const K_REST_API_KEY = process.env.REACT_APP_K_REST_API_KEY;
const K_REDIRECT_URL = process.env.REACT_APP_REDIRECT_URL;

export const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${K_REST_API_KEY}&redirect_uri=${K_REDIRECT_URL}&response_type=code`;
9 changes: 9 additions & 0 deletions src/assets/icons/AngryHoya.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/icons/Dialog.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/icons/Google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/assets/icons/HeartObj.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/Kakao.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/Lock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/Mileage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/icons/Obj.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/icons/Window.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
13 changes: 10 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
// index.js

import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import { ThemeProvider } from "styled-components";
import theme from "./styles/theme";
import { GoogleOAuthProvider } from "@react-oauth/google";

const clientId = process.env.REACT_APP_G_CLIENT_ID;

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
<GoogleOAuthProvider clientId={clientId}>
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>
</GoogleOAuthProvider>
</React.StrictMode>
);
Loading
Loading