-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from KUIT-Space/feat#99-chat-file
Feat#111 카카오 로그인
- Loading branch information
Showing
7 changed files
with
144 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,4 @@ dist-ssr | |
localhost-key.pem | ||
localhost.pem | ||
*_mockChat.tsx | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { useEffect } from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
|
||
import { kakaoLoginApi } from "@/apis"; | ||
|
||
const KakaoRedirection = () => { | ||
const navigate = useNavigate(); | ||
|
||
useEffect(() => { | ||
const code = new URL(document.location.toString()).searchParams.get("code"); | ||
kakaoLoginApi(code ?? "").then((res) => { | ||
console.log(res); | ||
if (res.status === "OK") { | ||
navigate("/space"); | ||
} else { | ||
alert("login 실패! : " + res.message); | ||
navigate("/login"); | ||
} | ||
}); | ||
}, [navigate]); | ||
|
||
return <div>카카오 로그인 중...</div>; | ||
}; | ||
|
||
export default KakaoRedirection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,115 +1,115 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Container = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 100%; | ||
max-width: 40rem; | ||
margin: 0 auto; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 100%; | ||
max-width: 40rem; | ||
margin: 0 auto; | ||
`; | ||
|
||
export const Logo = styled.div` | ||
display: flex; | ||
width: 38.89%; | ||
margin-top: 10rem; | ||
display: flex; | ||
width: 38.89%; | ||
margin-top: 10rem; | ||
`; | ||
|
||
export const Input = styled.input` | ||
display: flex; | ||
width: calc(100% - 2.5rem); | ||
height: 3.25rem; | ||
box-sizing: border-box; | ||
border-radius: 0.75rem; | ||
padding: 0.9375rem; | ||
padding-left: 1rem; | ||
border: 1px solid transparent; | ||
background-color: #222226; | ||
font-family: Freesentation; | ||
font-size: 1rem; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 140%; | ||
letter-spacing: 0.04rem; | ||
color: #ffffff; | ||
caret-color: #48ffbd; | ||
margin-top: 0.75rem; | ||
display: flex; | ||
width: calc(100% - 2.5rem); | ||
height: 3.25rem; | ||
box-sizing: border-box; | ||
border-radius: 0.75rem; | ||
padding: 0.9375rem; | ||
padding-left: 1rem; | ||
border: 1px solid transparent; | ||
background-color: #222226; | ||
font-family: Freesentation; | ||
font-size: 1rem; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 140%; | ||
letter-spacing: 0.04rem; | ||
color: #ffffff; | ||
caret-color: #48ffbd; | ||
margin-top: 0.75rem; | ||
&::placeholder { | ||
color: #767681; | ||
} | ||
&::placeholder { | ||
color: #767681; | ||
} | ||
&:focus { | ||
border-color: #48ffbd; | ||
outline: none; | ||
} | ||
&:focus { | ||
border-color: #48ffbd; | ||
outline: none; | ||
} | ||
`; | ||
|
||
interface LoginButtonProps { | ||
$isActive: boolean; | ||
$isActive: boolean; | ||
} | ||
|
||
export const LoginButton = styled.button<LoginButtonProps>` | ||
display: flex; | ||
width: calc(100% - 2.5rem); | ||
height: 3.25rem; | ||
padding: 0.875rem 0 0.8125rem 0; | ||
box-sizing: border-box; | ||
justify-content: center; | ||
align-items: center; | ||
margin-top: 2rem; | ||
background-color: ${({ $isActive }) => ($isActive ? "#48FFBD" : "#45454B")}; | ||
color: ${({ $isActive }) => ($isActive ? "#171719" : "#ACACB5")}; | ||
border-radius: 0.75rem; | ||
font-family: Freesentation; | ||
font-size: 1.125rem; | ||
font-style: normal; | ||
font-weight: 700; | ||
line-height: 140%; | ||
letter-spacing: 0.045rem; | ||
cursor: ${({ $isActive }) => ($isActive ? "pointer" : "default")}; | ||
display: flex; | ||
width: calc(100% - 2.5rem); | ||
height: 3.25rem; | ||
padding: 0.875rem 0 0.8125rem 0; | ||
box-sizing: border-box; | ||
justify-content: center; | ||
align-items: center; | ||
margin-top: 2rem; | ||
background-color: ${({ $isActive }) => ($isActive ? "#48FFBD" : "#45454B")}; | ||
color: ${({ $isActive }) => ($isActive ? "#171719" : "#ACACB5")}; | ||
border-radius: 0.75rem; | ||
font-family: Freesentation; | ||
font-size: 1.125rem; | ||
font-style: normal; | ||
font-weight: 700; | ||
line-height: 140%; | ||
letter-spacing: 0.045rem; | ||
cursor: ${({ $isActive }) => ($isActive ? "pointer" : "default")}; | ||
`; | ||
|
||
export const BtContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-top: 0.25rem; | ||
width: 83.33%; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-top: 0.25rem; | ||
width: 83.33%; | ||
`; | ||
|
||
export const Button = styled.button` | ||
display: flex; | ||
width: 6.25rem; | ||
height: 2.75rem; | ||
justify-content: center; | ||
align-items: center; | ||
color: #767681; | ||
text-align: center; | ||
font-family: Freesentation; | ||
font-size: 0.875rem; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 140%; | ||
letter-spacing: 0.035rem; | ||
cursor: pointer; | ||
display: flex; | ||
width: 6.25rem; | ||
height: 2.75rem; | ||
justify-content: center; | ||
align-items: center; | ||
color: #767681; | ||
text-align: center; | ||
font-family: Freesentation; | ||
font-size: 0.875rem; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 140%; | ||
letter-spacing: 0.035rem; | ||
cursor: pointer; | ||
`; | ||
|
||
export const ScContainer = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-top: 1.6875rem; | ||
width: 45.56%; | ||
gap: 1rem; | ||
margin-bottom: 1.75rem; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-top: 1.6875rem; | ||
width: 45.56%; | ||
gap: 1rem; | ||
margin-bottom: 1.75rem; | ||
`; | ||
|
||
export const Social = styled.button` | ||
display: flex; | ||
width: 2.75rem; | ||
height: 2.75rem; | ||
cursor: pointer; | ||
border-radius: 0.5rem; | ||
overflow: hidden; | ||
display: flex; | ||
width: 2.75rem; | ||
height: 2.75rem; | ||
cursor: pointer; | ||
border-radius: 0.5rem; | ||
overflow: hidden; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters