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: 내, 친구 냉장고 API 연동 #27

Merged
merged 25 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f8dbfd4
fix: 로티 gif -> json 및 react-lottie 설치
a-honey Feb 19, 2024
7d977c3
feat: 마이페이지 나의 정보 api 추가
a-honey Feb 19, 2024
c2126b9
feat: 내 냉장고에 이름 추가
a-honey Feb 19, 2024
f9e8d6b
feat: 식자재 추가 마크업
a-honey Feb 19, 2024
768d5ac
fix: 식자재 추가시 페이지 이동 및 다시 돌아와서 모달 오픈
a-honey Feb 19, 2024
e62e516
feat: 재료 선택 후 모달에서 정보 불러오기
a-honey Feb 19, 2024
ee56d8b
feat: 식자재 추가 뮤테이션 추가
a-honey Feb 19, 2024
0363b34
feat: 내 냉장고 정보 불러오기
a-honey Feb 19, 2024
60edf1b
feat: 냉장고 목록 조회 api
a-honey Feb 20, 2024
58c1617
feat: 마이페이지 식자재, 친구 count api 추가
a-honey Feb 20, 2024
c25d24e
fix: 콘솔에러 수정
a-honey Feb 20, 2024
7221769
feat: 스타일 추가
a-honey Feb 21, 2024
339c9bb
feat: 스타일 추가시 border 변경
a-honey Feb 21, 2024
ff9d74c
feat: 프로필 업데이트 api 추가
a-honey Feb 21, 2024
106b425
fix: 현재 프로필일때만 테두리
a-honey Feb 21, 2024
a68310f
feat: 냉장고 ID 식자재 가져오기 api 추가
a-honey Feb 21, 2024
985f4e9
feat: 내 냉장고 추가 api 연결
a-honey Feb 21, 2024
37e7507
fix: 식자재 추가 모달 식자재 추가 페이지 내로 위치 이동
a-honey Feb 21, 2024
5db50bf
fix: 미변경 에러 수정
a-honey Feb 21, 2024
d3fd953
feat: 식자재 추가 api 연결
a-honey Feb 21, 2024
7c47489
fix: 뮤테이션 메서드 추가
a-honey Feb 21, 2024
2dc0bf8
fix: 냉장고 리스트 길이에 따라 추가
a-honey Feb 22, 2024
2fdddfe
fix: 프로필 이미지 수정
a-honey Feb 22, 2024
7a4f77e
fix: 닉네임 중복 체크 수정
a-honey Feb 22, 2024
0f62678
fix: 콘솔 에러 수정
a-honey Feb 22, 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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"eslint-plugin-react": "^7.33.2",
"framer-motion": "^11.0.3",
"lodash": "^4.17.21",
"lottie-react": "^2.4.0",
"next": "14.0.3",
"react": "^18",
"react-dom": "^18",
Expand Down
3 changes: 3 additions & 0 deletions src/api/axiosInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ axiosInstance.interceptors.response.use(
const originalRequest = error.config;

if (error.response?.status === 401 && !originalRequest._retry) {
/*
originalRequest._retry = true;

const refreshToken =
Expand All @@ -49,6 +50,8 @@ axiosInstance.interceptors.response.use(
console.error('Error refreshing token:', refreshError);
throw refreshError;
}
*/
window.location.href = '/login';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

next에서 지원하는 라우팅 사용 부탁드립니당🙇‍♂️

}

return await Promise.reject(error);
Expand Down
2 changes: 1 addition & 1 deletion src/assets/icons/NotificationIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

const NotificationIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" {...props}>
<g clip-path="url(#clip0_1100_16324)">
<g clipPath="url(#clip0_1100_16324)">
<path
fillRule="evenodd"
clipRule="evenodd"
Expand Down
Binary file removed src/assets/lottie.gif
Binary file not shown.
317 changes: 317 additions & 0 deletions src/assets/lottie.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
{
"v": "5.5.8",
"fr": 29.9700012207031,
"ip": 2.00000008146167,
"op": 42.0000017106951,
"w": 500,
"h": 300,
"nm": "컴포지션 2",
"ddd": 0,
"assets": [],
"layers": [
{
"ddd": 0,
"ind": 1,
"ty": 4,
"nm": "모양 레이어 3",
"sr": 1,
"ks": {
"o": { "a": 0, "k": 100, "ix": 11 },
"r": { "a": 0, "k": 0, "ix": 10 },
"p": {
"a": 1,
"k": [
{
"i": { "x": 0.833, "y": 0.833 },
"o": { "x": 0.133, "y": 0.133 },
"t": 0,
"s": [350, 220, 0],
"to": [0, 0, 0],
"ti": [0, 0, 0]
},
{
"i": { "x": 0.382, "y": 1 },
"o": { "x": 0.63, "y": 0 },
"t": 12,
"s": [350, 220, 0],
"to": [0, -17.301, 0],
"ti": [0, 0, 0]
},
{
"i": { "x": 0.09, "y": 1 },
"o": { "x": 0.294, "y": 0 },
"t": 27,
"s": [350, 116.195, 0],
"to": [0, 0, 0],
"ti": [0, -17.301, 0]
},
{
"i": { "x": 0.861, "y": 0.861 },
"o": { "x": 0.167, "y": 0.167 },
"t": 42.5,
"s": [350, 220, 0],
"to": [0, 0, 0],
"ti": [0, 0, 0]
},
{ "t": 47.0000019143492, "s": [350, 220, 0] }
],
"ix": 2
},
"a": { "a": 0, "k": [0, 0, 0], "ix": 1 },
"s": { "a": 0, "k": [98, 98, 100], "ix": 6 }
},
"ao": 0,
"shapes": [
{
"ty": "gr",
"it": [
{
"d": 1,
"ty": "el",
"s": { "a": 0, "k": [45.688, 45.688], "ix": 2 },
"p": { "a": 0, "k": [0, 0], "ix": 3 },
"nm": "타원 패스 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "fl",
"c": { "a": 0, "k": [0.3216, 0.7725, 0.651, 1], "ix": 4 },
"o": { "a": 0, "k": 100, "ix": 5 },
"r": 1,
"bm": 0,
"nm": "ì¹  1",
"mn": "ADBE Vector Graphic - Fill",
"hd": false
},
{
"ty": "tr",
"p": { "a": 0, "k": [1, 0], "ix": 2 },
"a": { "a": 0, "k": [0, 0], "ix": 1 },
"s": { "a": 0, "k": [100, 100], "ix": 3 },
"r": { "a": 0, "k": 0, "ix": 6 },
"o": { "a": 0, "k": 100, "ix": 7 },
"sk": { "a": 0, "k": 0, "ix": 4 },
"sa": { "a": 0, "k": 0, "ix": 5 },
"nm": "변형"
}
],
"nm": "타원 1",
"np": 3,
"cix": 2,
"bm": 0,
"ix": 1,
"mn": "ADBE Vector Group",
"hd": false
}
],
"ip": 0,
"op": 60.0000024438501,
"st": 0,
"bm": 0
},
{
"ddd": 0,
"ind": 2,
"ty": 4,
"nm": "모양 레이어 1",
"sr": 1,
"ks": {
"o": { "a": 0, "k": 100, "ix": 11 },
"r": { "a": 0, "k": 0, "ix": 10 },
"p": {
"a": 1,
"k": [
{
"i": { "x": 0.833, "y": 0.833 },
"o": { "x": 0.133, "y": 0.133 },
"t": 0,
"s": [250, 220, 0],
"to": [0, 0, 0],
"ti": [0, 0, 0]
},
{
"i": { "x": 0.528, "y": 1 },
"o": { "x": 0.698, "y": 0 },
"t": 7,
"s": [250, 220, 0],
"to": [0, -16.134, 0],
"ti": [0, 0, 0]
},
{
"i": { "x": 0.152, "y": 1 },
"o": { "x": 0.284, "y": 0 },
"t": 22,
"s": [250, 123.195, 0],
"to": [0, 0, 0],
"ti": [0, -16.134, 0]
},
{
"i": { "x": 0.409, "y": 0.409 },
"o": { "x": 0.167, "y": 0.167 },
"t": 39,
"s": [250, 220, 0],
"to": [0, 0, 0],
"ti": [0, 0, 0]
},
{ "t": 47.0000019143492, "s": [250, 220, 0] }
],
"ix": 2
},
"a": { "a": 0, "k": [0, 0, 0], "ix": 1 },
"s": { "a": 0, "k": [98, 98, 100], "ix": 6 }
},
"ao": 0,
"shapes": [
{
"ty": "gr",
"it": [
{
"d": 1,
"ty": "el",
"s": { "a": 0, "k": [45.688, 45.688], "ix": 2 },
"p": { "a": 0, "k": [0, 0], "ix": 3 },
"nm": "타원 패스 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "fl",
"c": { "a": 0, "k": [0.3216, 0.7725, 0.651, 1], "ix": 4 },
"o": { "a": 0, "k": 100, "ix": 5 },
"r": 1,
"bm": 0,
"nm": "ì¹  1",
"mn": "ADBE Vector Graphic - Fill",
"hd": false
},
{
"ty": "tr",
"p": { "a": 0, "k": [1, 0], "ix": 2 },
"a": { "a": 0, "k": [0, 0], "ix": 1 },
"s": { "a": 0, "k": [100, 100], "ix": 3 },
"r": { "a": 0, "k": 0, "ix": 6 },
"o": { "a": 0, "k": 100, "ix": 7 },
"sk": { "a": 0, "k": 0, "ix": 4 },
"sa": { "a": 0, "k": 0, "ix": 5 },
"nm": "변형"
}
],
"nm": "타원 1",
"np": 3,
"cix": 2,
"bm": 0,
"ix": 1,
"mn": "ADBE Vector Group",
"hd": false
}
],
"ip": 0,
"op": 60.0000024438501,
"st": 0,
"bm": 0
},
{
"ddd": 0,
"ind": 3,
"ty": 4,
"nm": "모양 레이어 2",
"sr": 1,
"ks": {
"o": { "a": 0, "k": 100, "ix": 11 },
"r": { "a": 0, "k": 0, "ix": 10 },
"p": {
"a": 1,
"k": [
{
"i": { "x": 0.833, "y": 0.833 },
"o": { "x": 0.133, "y": 0.133 },
"t": 0,
"s": [150, 220, 0],
"to": [0, 0, 0],
"ti": [0, 0, 0]
},
{
"i": { "x": 0.726, "y": 1 },
"o": { "x": 0.728, "y": 0 },
"t": 2,
"s": [150, 220, 0],
"to": [0, -12.801, 0],
"ti": [0, 0, 0]
},
{
"i": { "x": 0.254, "y": 1 },
"o": { "x": 0.263, "y": 0 },
"t": 18,
"s": [150, 143.195, 0],
"to": [0, 0, 0],
"ti": [0, -12.801, 0]
},
{
"i": { "x": 0.861, "y": 0.861 },
"o": { "x": 0.167, "y": 0.167 },
"t": 35,
"s": [150, 220, 0],
"to": [0, 0, 0],
"ti": [0, 0, 0]
},
{ "t": 47.0000019143492, "s": [150, 220, 0] }
],
"ix": 2
},
"a": { "a": 0, "k": [0, 0, 0], "ix": 1 },
"s": { "a": 0, "k": [98, 98, 100], "ix": 6 }
},
"ao": 0,
"shapes": [
{
"ty": "gr",
"it": [
{
"d": 1,
"ty": "el",
"s": { "a": 0, "k": [45.688, 45.688], "ix": 2 },
"p": { "a": 0, "k": [0, 0], "ix": 3 },
"nm": "타원 패스 1",
"mn": "ADBE Vector Shape - Ellipse",
"hd": false
},
{
"ty": "fl",
"c": { "a": 0, "k": [0.3216, 0.7725, 0.651, 1], "ix": 4 },
"o": { "a": 0, "k": 100, "ix": 5 },
"r": 1,
"bm": 0,
"nm": "ì¹  1",
"mn": "ADBE Vector Graphic - Fill",
"hd": false
},
{
"ty": "tr",
"p": { "a": 0, "k": [1, 0], "ix": 2 },
"a": { "a": 0, "k": [0, 0], "ix": 1 },
"s": { "a": 0, "k": [100, 100], "ix": 3 },
"r": { "a": 0, "k": 0, "ix": 6 },
"o": { "a": 0, "k": 100, "ix": 7 },
"sk": { "a": 0, "k": 0, "ix": 4 },
"sa": { "a": 0, "k": 0, "ix": 5 },
"nm": "변형"
}
],
"nm": "타원 1",
"np": 3,
"cix": 2,
"bm": 0,
"ix": 1,
"mn": "ADBE Vector Group",
"hd": false
}
],
"ip": 0,
"op": 60.0000024438501,
"st": 0,
"bm": 0
}
],
"markers": []
}
12 changes: 12 additions & 0 deletions src/components/atoms/Lottie.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
// import Lottie from 'lottie-react';
// import animationData from './../../assets/lottie.json';

const LottieComponent = () => {
return (
// <Lottie animationData={animationData} style={{ width: 167, height: 156 }} />
<div>로딩중</div>
);
};

export default LottieComponent;
1 change: 1 addition & 0 deletions src/components/atoms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ export { default as RadioButtonField } from './RadioButtonField';
export { default as Input } from './Input';
export { default as MiniButton } from './MiniButton';
export { default as ExclamationAlertSpan } from './ExclamationAlertSpan';
export { default as Lottie } from './Lottie';
2 changes: 1 addition & 1 deletion src/components/molecules/Counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Counter: React.FC<CountState> = ({
<button className="w-[30px] text-center" onClick={handleDecreaseCount}>
-
</button>
<input className="w-[30px] text-center" value={currentCount} />
<input className="w-[30px] text-center" defaultValue={currentCount} />
<button className="w-[30px] text-center" onClick={handleIncreaseCount}>
+
</button>
Expand Down
Loading
Loading