-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 좋아요 버튼 이벤트 버블링 방지 * feat: 지도 마커 정보 API 연결 * feat: 마커 정보 데이터 불러오는 Axios 함수 추가 * feat: 검색어 입력 후 버튼 클릭시 검색 페이지로 이동 * feat: 마커 상세 카드 클릭시 상세 페이지로 이동 * style: 마커 상세 카드 닫기 버튼 z-index 조절 * feat: 소셜 로그인 컴포넌트 따로 분리 * feat: 로그인 버튼 하단에 회원가입, 아이디 찾기, 비밀번호 찾기 버튼 추가 * chore: 파일 경로 이동 * chore: 파일 import 경로 수정 * feat: 로그인 로직 구현 (추후 테스트 필요) * feat: 후기 페이지 제목 글꼴 변경 * chore: 불필요한 import 제거 * feat: 검색바 입력 후 페이지 이동 함수 분리 * feat: 분리된 함수 사용해서 검색 후 페이지 이동 * chore: 포스팅 상세 타입 명칭 변경 * chore: handleClickSearchProgram인자로 navigate 받도록 변경 * chore: 함수 인자로 navigate 넘겨주도록 변경 * chore: props 명칭 변경에 따른 수정 * style: 메인 페이지 width 1440px로 고정 * style: 메인 배너 이미지 변경 * feat: 로그인 성공시 Axios 기본 헤더에 토큰 추가 * fix: react-quill css파일 별도 분리 * fix: 소셜 로그인 아이콘 import 방식 변경 * chore: 사용하지 않는 변수 제거 * chore: 현재 사용하지 않는 변수 주석처리
- Loading branch information
Showing
20 changed files
with
1,272 additions
and
144 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Axios from '..'; | ||
|
||
export const fetchMapMarker = () => () => Axios.get('/programs/map'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,12 @@ | ||
import { NavigateFunction } from 'react-router-dom'; | ||
|
||
export const handleClickSearchProgram = ( | ||
searchInput: string, | ||
setSearchInput: React.Dispatch<React.SetStateAction<string>>, | ||
navigate: NavigateFunction, | ||
) => { | ||
// 검색 후 페이지 이동 | ||
console.log('@@@@'); | ||
navigate(`/search?keyword=${searchInput}`); | ||
setSearchInput(''); | ||
}; |
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,36 @@ | ||
import { B3 } from '@/style/fonts/StyledFonts'; | ||
import { Link } from 'react-router-dom'; | ||
import styled from 'styled-components'; | ||
|
||
const LoginNavLink = () => { | ||
return ( | ||
<Container> | ||
<Link to={'/signup'}> | ||
<B3 $fontColor="#666B6F">회원가입</B3> | ||
</Link> | ||
<Divider /> | ||
<B3 $fontColor="#666B6F">아이디 찾기</B3> | ||
<Divider /> | ||
<B3 $fontColor="#666B6F">비밀번호 찾기</B3> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default LoginNavLink; | ||
|
||
const Container = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-items: center; | ||
gap: 21px; | ||
pre { | ||
width: 88px; | ||
} | ||
`; | ||
|
||
const Divider = styled.div` | ||
width: 1px; | ||
height: 20px; | ||
background: var(--gray-300, #d2d7dc); | ||
`; |
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,58 @@ | ||
import styled from 'styled-components'; | ||
|
||
import Naver from '@/assets/icons/icon-naver.svg'; | ||
import Kakao from '@/assets/icons/icon-kakao.svg'; | ||
import Google from '@/assets/icons/icon-google.svg'; | ||
|
||
const SocialLogin = () => { | ||
const REST_API_KEY = import.meta.env.VITE_KAKAO_REST_API_KEY; //REST API KEY | ||
const REDIRECT_URI = `${window.location.origin}/kakao/login`; //REDIRECT URI | ||
// oauth 요청 URL | ||
const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${REST_API_KEY}&redirect_uri=${REDIRECT_URI}&response_type=code`; | ||
|
||
const handleKakaoLogin = () => { | ||
// 카카오 로그인 주소 | ||
window.location.href = kakaoURL; | ||
}; | ||
|
||
return ( | ||
<SocialLoginContainer> | ||
{/* 네이버 로그인 */} | ||
<SocialLoginButton> | ||
<img src={Naver} alt="naver" /> | ||
</SocialLoginButton> | ||
{/* 카카오 로그인 */} | ||
<SocialLoginButton onClick={handleKakaoLogin}> | ||
<img src={Kakao} alt="kakao" /> | ||
</SocialLoginButton> | ||
{/* 구글 로그인 */} | ||
<SocialLoginButton> | ||
<img src={Google} alt="google" /> | ||
</SocialLoginButton> | ||
</SocialLoginContainer> | ||
); | ||
}; | ||
|
||
export default SocialLogin; | ||
|
||
const SocialLoginContainer = styled.div` | ||
display: flex; | ||
align-items: flex-start; | ||
gap: 16px; | ||
`; | ||
|
||
const SocialLoginButton = styled.div` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
width: 56px; | ||
height: 56px; | ||
flex-shrink: 0; | ||
background: #f6f6f6; | ||
border-radius: 50%; | ||
cursor: pointer; | ||
`; |
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,14 @@ | ||
import Axios from '@/apis'; | ||
import { AxiosResponse } from 'axios'; | ||
|
||
export const onLoginSuccess = (res: AxiosResponse) => { | ||
const { accessToken, refreshToken } = res?.data?.result; | ||
refreshToken; | ||
Axios.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`; | ||
}; | ||
|
||
// export const onSilentRefresh = async () => { | ||
// try { | ||
// const res = await Axios.post(TOKEN) | ||
// } | ||
// } |
File renamed without changes.
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 |
---|---|---|
|
@@ -25,5 +25,6 @@ const Container = styled.div` | |
flex-direction: column; | ||
align-items: center; | ||
width: 100%; | ||
gap: 120px; | ||
`; |
Oops, something went wrong.