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

[홍재원] week19 #557

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
93a0e93
chore: 머지 후 브랜치 삭제 github action 추가
withyj-codeit Sep 3, 2023
b2e37bd
reset
hanseulhee Oct 10, 2023
6f8bbb0
Merge branch 'codeit-bootcamp-frontend:main' into main
hanseulhee Oct 10, 2023
e11e25f
fix: 머지 후 브랜치 삭제 github action 수정
hanseulhee Oct 10, 2023
212e864
env: workflows 폴더로 이동
hanseulhee Oct 10, 2023
4dc5dd0
Merge pull request #237 from hanseulhee/fix-github-actions
withyj-codeit Nov 6, 2023
98d03af
Chore: 기본 레이아웃만 남긴 파일
hongjw030 Jan 13, 2024
51eadd4
Chore: 토스트, 쿼리개발자, 리액트폼훅 라이브러리 설치
hongjw030 Jan 13, 2024
59b7d33
Feat: 에러페이지 생성
hongjw030 Jan 13, 2024
dca0609
Feat: 회원가입 구현
hongjw030 Jan 13, 2024
1771c2a
Feat: 로그인 기능 구현
hongjw030 Jan 13, 2024
a6a3647
Feat: 미들웨어 추가
hongjw030 Jan 13, 2024
f7afc21
Feat: nav 바에 user 연동
hongjw030 Jan 13, 2024
a625d27
Feat: nav 로그인 연동 추가
hongjw030 Jan 14, 2024
8787f1d
Feat: 폴더 추가 모달 생성
hongjw030 Jan 14, 2024
c344e3f
Refactor: 이미지 경로 수정
hongjw030 Jan 14, 2024
01d3292
Feat: 폴더 삭제 기능 추가
hongjw030 Jan 14, 2024
cbd9294
Feat: 폴더 삭제 기능 추가
hongjw030 Jan 14, 2024
6d4f122
Feat: 카드 리스트 불러오는 기능
hongjw030 Jan 14, 2024
9e02e98
Feat: 카드 케밥 추가
hongjw030 Jan 14, 2024
5dcdab3
Feat: 카드 삭제 기능
hongjw030 Jan 14, 2024
a98430f
Merge branch 'codeit-bootcamp-frontend:main' into part3-홍재원-week19
hongjw030 Jan 15, 2024
47e856c
Refactor: useQuery에 enable 속성 추가
hongjw030 Jan 15, 2024
15de4db
Merge branch 'part3-홍재원-week19' of https://github.com/Hongjw030/1-Wee…
hongjw030 Jan 15, 2024
f6cbbcd
Refactor: folders 하위 페이지에서도 라우팅 작동하게 코드 수정
hongjw030 Jan 15, 2024
75f4a9d
Bug: 토큰 재요청 코드 에러
hongjw030 Jan 15, 2024
d412f34
Refactor: api 파일 정리
hongjw030 Jan 16, 2024
c7300cb
Refactor: 파일 확장자 변경
hongjw030 Jan 16, 2024
7ac4116
Refactor: 타입 전체 수정
hongjw030 Jan 16, 2024
6f57055
Feat: useToast 훅 생성
hongjw030 Jan 16, 2024
955354d
Refactor: 임포트문 수정
hongjw030 Jan 16, 2024
f9aa923
Refactor: 모달창 전역 상태 관리 코드 추가
hongjw030 Jan 16, 2024
0788c47
Feat: 공유 모달 생성
hongjw030 Jan 16, 2024
3a005e1
Refactor: 모달 불필요한 인자 제거
hongjw030 Jan 16, 2024
c1dc3ea
Refactor: invalidQueries의 타입에러 수정
hongjw030 Jan 16, 2024
2ee24d2
Feat: favorite 버튼 컴포넌트 생성
hongjw030 Jan 16, 2024
3b77286
Feat: share 페이지 생성
hongjw030 Jan 16, 2024
c480706
Fix: nav의 프로필 깜빡임 문제 해결
hongjw030 Jan 17, 2024
5550c9b
Docs; 주석 수정
hongjw030 Jan 17, 2024
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
14 changes: 14 additions & 0 deletions .github/workflows/delete-merged-branch-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: delete branch on close pr

on:
pull_request:
types: [closed]

jobs:
delete-branch:
runs-on: ubuntu-latest
steps:
- name: delete branch
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ const nextConfig = {
protocol: "http",
hostname: "localhost",
},
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
},
{
protocol: "https",
hostname: "ca.slack-edge.com",
},
],
},
};
Expand Down
196 changes: 186 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@
"lint": "next lint"
},
"dependencies": {
"@tanstack/react-query": "^5.17.10",
"@tanstack/react-query-devtools": "^5.17.10",
"axios": "^1.6.2",
"next": "14.0.3",
"react": "^18",
"react-cookie": "^7.0.1",
"react-dom": "^18",
"sass": "^1.69.5"
"react-hook-form": "^7.49.3",
"react-hot-toast": "^2.4.1",
"sass": "^1.69.5",
"zustand": "^4.4.7"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
Expand Down
44 changes: 44 additions & 0 deletions src/api/axiosInstance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import axios from "axios";
import { getCookie, setCookie } from "@/utils/manageCookie";
import { getNewToken } from "./getAuthApi";

export const axiosInstance = axios.create({
baseURL: "https://bootcamp-api.codeit.kr/api/linkbrary/v1/",
headers: {
"Content-Type": "application/json",
withCredentials: true,
},
});

axiosInstance.interceptors.request.use(
(config) => {
const accessToken = getCookie("accessToken");
config.headers["Authorization"] = `Bearer ${accessToken}`;
return config;
},
(error) => {
return Promise.reject(error);
},
);

axios.interceptors.response.use(
hongjw030 marked this conversation as resolved.
Show resolved Hide resolved
(res) => res,
async (error) => {
const {
config,
response: { status },
} = error;

if (status === 401) {
const originRequest = config;
const { data } = await getNewToken();
if (data) {
setCookie("accessToken", data.accessToken);
setCookie("refreshToken", data.refreshToken);
originRequest.headers["Authorization"] = `Bearer ${data.accessToken}`;
return axios(originRequest);
hongjw030 marked this conversation as resolved.
Show resolved Hide resolved
}
}
return Promise.reject(error);
},
);
hongjw030 marked this conversation as resolved.
Show resolved Hide resolved
Loading