From 649d229902802724757bbf614fdbc9922be6c891 Mon Sep 17 00:00:00 2001 From: "Ahyeon, Jung" <75254185+a-honey@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:28:57 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B8=B0=EB=B3=B8=20=EB=83=89=EC=9E=A5?= =?UTF-8?q?=EA=B3=A0,=20=EB=83=89=EC=9E=A5=EA=B3=A0=20=EC=8B=9D=EC=9E=90?= =?UTF-8?q?=EC=9E=AC=20=EB=B3=80=EA=B2=BD=20resetQueries,=20=EC=B9=9C?= =?UTF-8?q?=EA=B5=AC=EB=AA=A9=EB=A1=9D,=20=EB=82=98=EB=88=94=20=EB=82=B4?= =?UTF-8?q?=EC=97=AD=20api=20=EC=88=98=EC=A0=95=20(#36)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 친구들페이지 친구 목록, 내 기본 냉장고 추가 * fix: 냉장고 정보 useState * fix: 구글 로그인 수정 * chore: import 순서 변경 * fix: api 수정 * feat: 문의 주소 추가 * fix: 식자재 추가 시 해당 냉장고로 이동 * fix: 진행중인 나눔 내역 sort 반영 * fix: queryClient.resetQueries after mutation success * fix: eslint error --- .eslintrc.js | 9 +- package.json | 1 + src/components/atoms/BorderTab.tsx | 7 +- src/components/atoms/Button.tsx | 15 ++- src/components/atoms/CheckBox.tsx | 8 +- src/components/atoms/ExclamationAlertSpan.tsx | 11 +- src/components/organisms/FridgeBoard.tsx | 16 +-- src/components/organisms/FridgeInfoBox.tsx | 11 +- src/components/organisms/FridgeListModal.tsx | 11 +- src/components/organisms/FriendListItem.tsx | 7 +- .../organisms/FriendsFridgeList.tsx | 116 ++++++++++++++---- .../organisms/FriendsRecentBoard.tsx | 12 +- src/components/organisms/IngredientBoard.tsx | 5 +- src/components/organisms/IngredientModal.tsx | 33 +++-- src/components/organisms/NavWhiteBox.tsx | 2 +- .../templates/FriendListTemplate.tsx | 2 +- .../queries/fridge/useDeleteIngredientById.ts | 2 +- .../queries/fridge/useGetMyIngredient.ts | 2 +- src/hooks/queries/fridge/usePostIngredient.ts | 2 +- .../queries/fridge/usePutIngredientById.ts | 6 +- .../queries/friendship/useGetFriendships.ts | 3 +- src/hooks/queries/login/useGetGoogleToken.ts | 2 +- src/hooks/queries/login/usePostUser.ts | 2 +- src/hooks/queries/mypage/useGetMyShares.ts | 10 +- src/hooks/queries/queryKeys.ts | 4 +- src/pages/_app.tsx | 20 +-- src/pages/fridge/add/index.tsx | 11 +- src/pages/fridge/index.tsx | 45 ++++--- src/pages/friend/[id]/index.tsx | 42 +++++-- src/pages/mypage/index.tsx | 2 +- src/pages/mypage/notification/index.tsx | 4 +- src/pages/mypage/profile/index.tsx | 14 +-- src/pages/mypage/share/index.tsx | 11 +- src/types/fridge/index.d.ts | 6 + src/types/mypage/index.d.ts | 1 + yarn.lock | 12 ++ 36 files changed, 298 insertions(+), 169 deletions(-) create mode 100644 src/types/mypage/index.d.ts diff --git a/.eslintrc.js b/.eslintrc.js index d66373e..62dd04f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,12 +6,7 @@ module.exports = { globals: { JSX: true, }, - extends: [ - 'standard-with-typescript', - 'eslint:recommended', - 'plugin:prettier/recommended', - 'next/core-web-vitals' - ], + extends: ['standard-with-typescript', 'eslint:recommended', 'plugin:prettier/recommended'], parserOptions: { ecmaVersion: 'latest', sourceType: 'module', @@ -21,6 +16,6 @@ module.exports = { '@typescript-eslint/strict-boolean-expressions': 'off', 'prettier/prettier': ['error', { endOfLine: 'auto' }], '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-floating-promises': 'off' + '@typescript-eslint/no-floating-promises': 'off', }, }; diff --git a/package.json b/package.json index a48a124..b5eca10 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", "@tanstack/react-query": "^5.18.1", + "@tanstack/react-query-devtools": "^5.24.1", "@typescript-eslint/parser": "^6.19.0", "axios": "^1.6.5", "dayjs": "^1.11.10", diff --git a/src/components/atoms/BorderTab.tsx b/src/components/atoms/BorderTab.tsx index 26bf1a4..1c156c1 100644 --- a/src/components/atoms/BorderTab.tsx +++ b/src/components/atoms/BorderTab.tsx @@ -7,12 +7,7 @@ interface BorderTabProps { clickHandler?: () => void; className?: string; } -const BorderTab: React.FC = ({ - tabName, - className, - currentTabName, - handleTabNameChange, -}) => { +const BorderTab: React.FC = ({ tabName, className, currentTabName, handleTabNameChange }) => { return (
-> = ({ text, className, onClick, ...props }) => { +const Button: React.FC> = ({ + text, + className, + onClick, + ...props +}) => { return ( - ); diff --git a/src/components/atoms/CheckBox.tsx b/src/components/atoms/CheckBox.tsx index 9f8e388..f212ca4 100644 --- a/src/components/atoms/CheckBox.tsx +++ b/src/components/atoms/CheckBox.tsx @@ -1,12 +1,8 @@ import { CheckIcon } from '@/assets/icons'; import React from 'react'; -const CheckBox: React.FC<{ active: boolean; onClick: () => void }> = ({ - active = false, - onClick, -}) => { - const commonStyle = - 'flex justify-center items-center w-[20px] h-[20px] rounded-full'; +const CheckBox: React.FC<{ active: boolean; onClick: () => void }> = ({ active = false, onClick }) => { + const commonStyle = 'flex justify-center items-center w-[20px] h-[20px] rounded-full'; const buttonClassName = `${commonStyle} ${active ? 'bg-primary2' : 'border border-gray5'}`; return (