From 323777145074e0d397695244640623f1b339ce80 Mon Sep 17 00:00:00 2001 From: chanbyeol Date: Wed, 18 Dec 2024 19:34:14 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=20=EB=A7=A4=EC=B6=9C=20=ED=86=B5?= =?UTF-8?q?=EA=B3=84=20=ED=9B=85=20=EA=B5=AC=ED=98=84,=20Income=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EB=A1=9C=EB=93=9C,=20=EB=A9=94=EC=9D=B8=ED=97=A4?= =?UTF-8?q?=EB=8D=94=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EB=AC=B8=EA=B5=AC=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/salon/src/App.tsx | 4 + .../income/MonthIncomeStatistic.tsx | 14 ++ .../src/components/income/PetStatistic.tsx | 28 ++++ .../income/RecentIncomeStatistic.tsx | 16 +++ apps/salon/src/pages/Income/Income.tsx | 58 ++++++++ ....timestamp-1734462252624-4189b1039114a.mjs | 33 ----- .../ui/src/components/Header/MainHeader.tsx | 2 +- packages/utils/src/apis/salon/hooks/income.ts | 124 ++++++++++++++++++ packages/utils/src/apis/salon/hooks/index.ts | 3 +- packages/utils/src/apis/salon/income.ts | 53 ++++++++ packages/utils/src/apis/salon/index.ts | 3 +- packages/utils/src/apis/types/income.ts | 63 +++++++++ 12 files changed, 365 insertions(+), 36 deletions(-) create mode 100644 apps/salon/src/components/income/MonthIncomeStatistic.tsx create mode 100644 apps/salon/src/components/income/PetStatistic.tsx create mode 100644 apps/salon/src/components/income/RecentIncomeStatistic.tsx create mode 100644 apps/salon/src/pages/Income/Income.tsx delete mode 100644 apps/salon/vite.config.ts.timestamp-1734462252624-4189b1039114a.mjs create mode 100644 packages/utils/src/apis/salon/hooks/income.ts create mode 100644 packages/utils/src/apis/salon/income.ts create mode 100644 packages/utils/src/apis/types/income.ts diff --git a/apps/salon/src/App.tsx b/apps/salon/src/App.tsx index 3f7bad17..b3ca9350 100644 --- a/apps/salon/src/App.tsx +++ b/apps/salon/src/App.tsx @@ -19,6 +19,8 @@ import ReservationPage from '@pages/Quotation/ReservationPage'; import PrivateRoute from '@components/PrivateRoute'; +import IncomePage from './pages/Income/Income'; + function App() { return ( @@ -47,6 +49,8 @@ function App() { path="/portfolio/:groomerId/:portfolioId" element={} /> + + } /> diff --git a/apps/salon/src/components/income/MonthIncomeStatistic.tsx b/apps/salon/src/components/income/MonthIncomeStatistic.tsx new file mode 100644 index 00000000..984eb543 --- /dev/null +++ b/apps/salon/src/components/income/MonthIncomeStatistic.tsx @@ -0,0 +1,14 @@ +import { IncomeMonthListType } from '@duri-fe/utils/src/apis/types/income'; + +interface MonthIncomeStatisticProps { + beforeRatio: number; //전월대비 증감 + incomeMonthList: IncomeMonthListType[]; //최근 5달 매출 리스트 +} + +export const MonthIncomeStatistic = ({ + beforeRatio, + incomeMonthList, +}: MonthIncomeStatisticProps) => { + console.log(incomeMonthList, beforeRatio); + return
MonthIncomeStatistic
; +}; diff --git a/apps/salon/src/components/income/PetStatistic.tsx b/apps/salon/src/components/income/PetStatistic.tsx new file mode 100644 index 00000000..05f63ab3 --- /dev/null +++ b/apps/salon/src/components/income/PetStatistic.tsx @@ -0,0 +1,28 @@ +interface PetStatisticProps { + agePetStatistic?: { + standard: string; + ratio: number; + count: number; + }[]; + + diseasePetStatistic?: { + standard: string; + ratio: number; + count: number; + }[]; + + characterPetStatistic?: { + standard: string; + ratio: number; + count: number; + }[]; +} + +export const PetStatistic = ({ + agePetStatistic, + characterPetStatistic, + diseasePetStatistic, +}: PetStatisticProps) => { + console.log(agePetStatistic, diseasePetStatistic, characterPetStatistic); + return
PetStatistic
; +}; diff --git a/apps/salon/src/components/income/RecentIncomeStatistic.tsx b/apps/salon/src/components/income/RecentIncomeStatistic.tsx new file mode 100644 index 00000000..a0a28a3c --- /dev/null +++ b/apps/salon/src/components/income/RecentIncomeStatistic.tsx @@ -0,0 +1,16 @@ +import { IncomeMonthListType } from '@duri-fe/utils/src/apis/types/income'; + +interface RecentIncomeStatisticProps { + incomeMonthList: IncomeMonthListType[]; //선택, 이전, 이번달 매출 리스트 + beforeRatio: number; //전월 대비 증감 + nowRatio: number; //이번달 대비 증감 +} + +export const RecentIncomeStatistic = ({ + incomeMonthList, + beforeRatio, + nowRatio, +}: RecentIncomeStatisticProps) => { + console.log(incomeMonthList, beforeRatio, nowRatio); + return
RecentIncomeStatistic
; +}; diff --git a/apps/salon/src/pages/Income/Income.tsx b/apps/salon/src/pages/Income/Income.tsx new file mode 100644 index 00000000..af848717 --- /dev/null +++ b/apps/salon/src/pages/Income/Income.tsx @@ -0,0 +1,58 @@ +import { useNavigate } from 'react-router-dom'; + +import { Header, MobileLayout, SalonNavbar } from '@duri-fe/ui'; +import { + useGetAgeStatistic, + useGetCharacterStatistic, + useGetDiseaseStatistic, + useGetSelectedMonthIncome, + useGetThisMonthIncome, +} from '@duri-fe/utils'; +import { MonthIncomeStatistic } from '@salon/components/income/MonthIncomeStatistic'; +import { PetStatistic } from '@salon/components/income/PetStatistic'; +import { RecentIncomeStatistic } from '@salon/components/income/RecentIncomeStatistic'; + +const IncomePage = () => { + const navigate = useNavigate(); + const handleClickBack = () => { + navigate('/'); + }; + + const { data: monthIncomeData } = useGetThisMonthIncome({}); + const { data: selectedIncomeData } = useGetSelectedMonthIncome({ month: 12 }); + const { data: agePetStatistic } = useGetAgeStatistic({}); + const { data: diseasePetStatistic } = useGetDiseaseStatistic({}); + const { data: characterPetStatistic } = useGetCharacterStatistic({}); + + return ( + +
+ {monthIncomeData && ( + + )} + + {selectedIncomeData && ( + + )} + {} + + + ); +}; +export default IncomePage; diff --git a/apps/salon/vite.config.ts.timestamp-1734462252624-4189b1039114a.mjs b/apps/salon/vite.config.ts.timestamp-1734462252624-4189b1039114a.mjs deleted file mode 100644 index da2dd990..00000000 --- a/apps/salon/vite.config.ts.timestamp-1734462252624-4189b1039114a.mjs +++ /dev/null @@ -1,33 +0,0 @@ -// vite.config.ts -import react from "file:///Users/binary_ro/Documents/Github/Duri-FE/.yarn/__virtual__/@vitejs-plugin-react-virtual-4e7212b94d/4/.yarn/berry/cache/@vitejs-plugin-react-npm-4.3.4-e5f654de44-10c0.zip/node_modules/@vitejs/plugin-react/dist/index.mjs"; -import { defineConfig } from "file:///Users/binary_ro/Documents/Github/Duri-FE/.yarn/__virtual__/vite-virtual-4c119f49ef/4/.yarn/berry/cache/vite-npm-5.4.11-9da365ef2b-10c0.zip/node_modules/vite/dist/node/index.js"; -var vite_config_default = defineConfig({ - plugins: [react()], - resolve: { - alias: [ - { find: "@salon", replacement: "/src" }, - { find: "@pages", replacement: "/src/pages" }, - { find: "@components", replacement: "/src/components" }, - { find: "@styles", replacement: "/src/styles" }, - { find: "@assets", replacement: "/src/assets" }, - { find: "@mocks", replacement: "/src/mocks" }, - { find: "@utils", replacement: "/src/utils" }, - { find: "@types", replacement: "/src/types" }, - { find: "@hooks", replacement: "/src/hooks" } - ] - }, - server: { - port: 3001, - proxy: { - "/naver-api": { - target: "https://naveropenapi.apigw.ntruss.com", - changeOrigin: true, - rewrite: (path) => path.replace(/^\/naver-api/, "") - } - } - } -}); -export { - vite_config_default as default -}; -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvYmluYXJ5X3JvL0RvY3VtZW50cy9HaXRodWIvRHVyaS1GRS9hcHBzL3NhbG9uXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCIvVXNlcnMvYmluYXJ5X3JvL0RvY3VtZW50cy9HaX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ixNQUFNO0FBQUEsSUFDTixPQUFPO0FBQUEsTUFDTCxjQUFjO0FBQUEsUUFDWixRQUFRO0FBQUEsUUFDUixjQUFjO0FBQUEsUUFDZCxTQUFTLENBQUMsU0FBUyxLQUFLLFFBQVEsZ0JBQWdCLEVBQUU7QUFBQSxNQUNwRDtBQUFBLElBQ0Y7QUFBQSxFQUNGO0FBQ0YsQ0FBQzsiLAogICJuYW1lcyI6IFtdCn0K diff --git a/packages/ui/src/components/Header/MainHeader.tsx b/packages/ui/src/components/Header/MainHeader.tsx index 3eef731e..2b30f36f 100644 --- a/packages/ui/src/components/Header/MainHeader.tsx +++ b/packages/ui/src/components/Header/MainHeader.tsx @@ -58,7 +58,7 @@ export const MainHeader = ({ )} {login && ( - Login + 로그인 )} diff --git a/packages/utils/src/apis/salon/hooks/income.ts b/packages/utils/src/apis/salon/hooks/income.ts new file mode 100644 index 00000000..2e867046 --- /dev/null +++ b/packages/utils/src/apis/salon/hooks/income.ts @@ -0,0 +1,124 @@ +import { useQuery } from '@tanstack/react-query'; + +import { BaseError } from '../../types'; +import { + GetAgeStatisticResponse, + GetCharacterStatisticResponse, + GetDiseaseStatisticResponse, + GetRecentDaysResponse, + GetSelectedMonthIncomeResponse, + GetThisMonthIncomeResponse, +} from '../../types/income'; +import { UseQueryProps } from '../../types/tanstack'; +import { + getAgeStatistic, + getCharacterStatistic, + getDiseaseStatistic, + getRecentDaysIncome, + getSelectedMonthIncome, + getThisMonthIncome, +} from '../income'; + +//이번달 + 최근 5달 매출 조회 +type UseGetThisMonthIncomeType = UseQueryProps< + GetThisMonthIncomeResponse['response'], + BaseError +>; + +export const useGetThisMonthIncome = ({ + queryKey, + options, +}: UseGetThisMonthIncomeType) => { + return useQuery({ + queryKey: ['getThisMonthIncome', ...(queryKey || [])], + queryFn: () => getThisMonthIncome(), + ...options, + }); +}; + +//선택 월 매출조회 : 12월 +type UseGetSelectedMonthIncomeType = UseQueryProps< + GetSelectedMonthIncomeResponse['response'], + BaseError +> & { + month: number; +}; + +export const useGetSelectedMonthIncome = ({ + queryKey, + options, + month, +}: UseGetSelectedMonthIncomeType) => { + return useQuery({ + queryKey: ['getSelectedMonthIncome', month, ...(queryKey || [])], + queryFn: () => getSelectedMonthIncome(month), + ...options, + }); +}; + +//최근 7일 매출 조회 +type UseGetRecentDaysIncomeType = UseQueryProps< + GetRecentDaysResponse['response'], + BaseError +>; +export const useGetRecentDaysIncome = ({ + queryKey, + options, +}: UseGetRecentDaysIncomeType) => { + return useQuery({ + queryKey: ['getRecentDaysIncome', ...(queryKey || [])], + queryFn: () => getRecentDaysIncome(), + ...options, + }); +}; + +//반려견 나이 누적 조회 +type UseGetAgeStatisticType = UseQueryProps< + GetAgeStatisticResponse['response'], + BaseError +>; + +export const useGetAgeStatistic = ({ + queryKey, + options, +}: UseGetAgeStatisticType) => { + return useQuery({ + queryKey: ['getAgeStatistic', ...(queryKey || [])], + queryFn: () => getAgeStatistic(), + ...options, + }); +}; + +//반려견 성격 누적 조회 +type UseGetCharacterStatisticType = UseQueryProps< + GetCharacterStatisticResponse['response'], + BaseError +>; + +export const useGetCharacterStatistic = ({ + queryKey, + options, +}: UseGetCharacterStatisticType) => { + return useQuery({ + queryKey: ['getCharacterStatistic', ...(queryKey || [])], + queryFn: () => getCharacterStatistic(), + ...options, + }); +}; + +//반려견 질환 누적 조회 +type UseGetDiseaseStatisticType = UseQueryProps< + GetDiseaseStatisticResponse['response'], + BaseError +>; + +export const useGetDiseaseStatistic = ({ + queryKey, + options, +}: UseGetDiseaseStatisticType) => { + return useQuery({ + queryKey: ['getDiseaseStatistic', ...(queryKey || [])], + queryFn: () => getDiseaseStatistic(), + ...options, + }); +}; diff --git a/packages/utils/src/apis/salon/hooks/index.ts b/packages/utils/src/apis/salon/hooks/index.ts index 5cc3de67..c767a7f7 100644 --- a/packages/utils/src/apis/salon/hooks/index.ts +++ b/packages/utils/src/apis/salon/hooks/index.ts @@ -4,4 +4,5 @@ export * from './request'; export * from './quotation'; export * from './onboarding'; export * from './my'; -export * from './portfolio'; \ No newline at end of file +export * from './portfolio'; +export * from './income' \ No newline at end of file diff --git a/packages/utils/src/apis/salon/income.ts b/packages/utils/src/apis/salon/income.ts new file mode 100644 index 00000000..ca23beaa --- /dev/null +++ b/packages/utils/src/apis/salon/income.ts @@ -0,0 +1,53 @@ +import { salonInstance } from '../config'; +import { + GetAgeStatisticResponse, + GetCharacterStatisticResponse, + GetDiseaseStatisticResponse, + GetRecentDaysResponse, + GetSelectedMonthIncomeResponse, + GetThisMonthIncomeResponse, +} from '../types/income'; + +export const getThisMonthIncome = async (): Promise< + GetThisMonthIncomeResponse['response'] +> => { + const { data } = await salonInstance.get('statistics/income/five-month'); + return data; +}; + +export const getSelectedMonthIncome = async (month: number): Promise< + GetSelectedMonthIncomeResponse['response'] +> => { + const { data } = await salonInstance.get('statistics/income/month', { + params: { month: month }, + }); + return data; +}; + +export const getRecentDaysIncome = async (): Promise< + GetRecentDaysResponse['response'] +> => { + const { data } = await salonInstance.get('statistics/age'); + return data; +}; + +export const getAgeStatistic = async (): Promise< + GetAgeStatisticResponse['response'] +> => { + const { data } = await salonInstance.get('statistics/age'); + return data; +}; + +export const getCharacterStatistic = async (): Promise< + GetCharacterStatisticResponse['response'] +> => { + const { data } = await salonInstance.get('statistics/character'); + return data; +}; + +export const getDiseaseStatistic = async (): Promise< + GetDiseaseStatisticResponse['response'] +> => { + const { data } = await salonInstance.get('statistics/disease'); + return data; +}; \ No newline at end of file diff --git a/packages/utils/src/apis/salon/index.ts b/packages/utils/src/apis/salon/index.ts index 040a68d8..592a6641 100644 --- a/packages/utils/src/apis/salon/index.ts +++ b/packages/utils/src/apis/salon/index.ts @@ -5,4 +5,5 @@ export * from './request'; export * from './quotation'; export * from './onboarding'; export * from './my'; -export * from './portfolio'; \ No newline at end of file +export * from './portfolio'; +export * from './income'; diff --git a/packages/utils/src/apis/types/income.ts b/packages/utils/src/apis/types/income.ts new file mode 100644 index 00000000..f1e72efd --- /dev/null +++ b/packages/utils/src/apis/types/income.ts @@ -0,0 +1,63 @@ +import { BaseResponse } from './base'; + +export interface IncomeMonthListType { + date: string; + income: number; +} + +export interface GetThisMonthIncomeResponse extends BaseResponse { + response: { + shopId: number; + beforeRatio: number; + incomeMonthList: IncomeMonthListType[]; + }; +} + +export interface GetSelectedMonthIncomeResponse extends BaseResponse { + response: { + shopId: number; + incomeMonthList: IncomeMonthListType[]; + beforeRatio: number; + nowRatio: number; + }; +} + +export interface GetRecentDaysResponse extends BaseResponse { + response: { + shopId: number; + incomeMonthList: IncomeMonthListType[]; + }; +} + +export interface GetAgeStatisticResponse extends BaseResponse { + response: { + shopId: number; + ageList: { + standard: string; + ratio: number; + count: number; + }[]; + }; +} + +export interface GetDiseaseStatisticResponse extends BaseResponse { + response: { + shopId: number; + diseaseList: { + standard: string; + ratio: number; + count: number; + }[]; + }; +} + +export interface GetCharacterStatisticResponse extends BaseResponse { + response: { + shopId: number; + characterList: { + standard: string; + ratio: number; + count: number; + }[]; + }; +} From 47fa2c4f792d84c90589962b3dbb52af23493c08 Mon Sep 17 00:00:00 2001 From: chanbyeol Date: Wed, 18 Dec 2024 19:46:27 +0900 Subject: [PATCH 2/4] =?UTF-8?q?chore:=20=EB=A9=94=EC=9D=B8=ED=97=A4?= =?UTF-8?q?=EB=8D=94=20=EB=AC=B8=EA=B5=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/src/components/Header/MainHeader.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/components/Header/MainHeader.tsx b/packages/ui/src/components/Header/MainHeader.tsx index 2b30f36f..32596143 100644 --- a/packages/ui/src/components/Header/MainHeader.tsx +++ b/packages/ui/src/components/Header/MainHeader.tsx @@ -1,4 +1,4 @@ -import { Doori, Flex, Magnifier, Notification, theme } from '@duri-fe/ui'; +import { Doori, Flex, Magnifier, Notification, Text, theme } from '@duri-fe/ui'; import styled from '@emotion/styled'; import { HeightFitFlex } from '../FlexBox/Flex'; @@ -58,7 +58,9 @@ export const MainHeader = ({ )} {login && ( - 로그인 + + 로그인/회원가입 + )} @@ -88,5 +90,5 @@ const LoginLink = styled.a` const LoginButton = styled.div` cursor: pointer; - padding: 5px 10px; + /* padding: 5px 10px; */ `; From fddb7bc9bd4d3a07a6e9e404042001a0f222538e Mon Sep 17 00:00:00 2001 From: chanbyeol Date: Wed, 18 Dec 2024 19:58:22 +0900 Subject: [PATCH 3/4] =?UTF-8?q?chore:=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=EC=BD=98=EC=86=94=20=EB=A1=9C=EA=B7=B8=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/reservation/UpcomingReservation.tsx | 1 - apps/duri/src/components/payment/Widget.tsx | 4 ---- apps/duri/src/components/request/Calendar.tsx | 1 - apps/duri/src/mocks/index.ts | 3 --- apps/duri/src/pages/My/MyReview.tsx | 1 - apps/duri/src/pages/Payment/Success.tsx | 2 -- .../src/pages/Quotation/QuotationDetail.tsx | 2 -- apps/duri/src/pages/Quotation/index.tsx | 4 ---- apps/duri/src/pages/Review/ReviewModify.tsx | 1 - apps/duri/src/pages/Shop/index.tsx | 2 -- .../components/onboarding/InputSalonOwner.tsx | 1 - apps/salon/src/pages/Onboarding/index.tsx | 5 ----- .../ui/src/components/Header/MainHeader.tsx | 1 - .../components/Quotation/RequestQuotation.tsx | 2 -- packages/utils/src/apis/duri/hooks/my.ts | 21 +++++++++++++------ packages/utils/src/apis/duri/payment.ts | 10 +++------ packages/utils/src/apis/duri/portfolio.ts | 2 +- packages/utils/src/mocks/index.ts | 3 --- 18 files changed, 19 insertions(+), 47 deletions(-) diff --git a/apps/duri/src/components/home/reservation/UpcomingReservation.tsx b/apps/duri/src/components/home/reservation/UpcomingReservation.tsx index d9bdd0ab..10323fa4 100644 --- a/apps/duri/src/components/home/reservation/UpcomingReservation.tsx +++ b/apps/duri/src/components/home/reservation/UpcomingReservation.tsx @@ -42,7 +42,6 @@ const UpcomingReservation = ({ const handleClickChatButton = () => { //오픈채팅방 주소 알려주는 모달 뜨게?하면 될 듯 - console.log(kakaoURL); }; const handleClickShopButton = () => { diff --git a/apps/duri/src/components/payment/Widget.tsx b/apps/duri/src/components/payment/Widget.tsx index bfb12a66..f0d3ac41 100644 --- a/apps/duri/src/components/payment/Widget.tsx +++ b/apps/duri/src/components/payment/Widget.tsx @@ -68,10 +68,6 @@ const PaymentWidget = ({ widgets.setAmount(amount); }, [widgets, amount]); - useEffect(() => { - console.log(uuidData); - }, [uuidData]); - return ( diff --git a/apps/duri/src/components/request/Calendar.tsx b/apps/duri/src/components/request/Calendar.tsx index 33850c88..67493222 100644 --- a/apps/duri/src/components/request/Calendar.tsx +++ b/apps/duri/src/components/request/Calendar.tsx @@ -29,7 +29,6 @@ const MonthlyCalendar = ({ onSelect }: CalendarProps) => { const stringDate = format(value, 'yyyy-MM-dd'); onSelect('day', stringDate); } - console.log(value); }; return ( diff --git a/apps/duri/src/mocks/index.ts b/apps/duri/src/mocks/index.ts index 15a807ca..f1ace99e 100644 --- a/apps/duri/src/mocks/index.ts +++ b/apps/duri/src/mocks/index.ts @@ -1,11 +1,8 @@ export async function enableMocking() { - console.log(import.meta.env.VITE_MSW_ENABLED); if (import.meta.env.VITE_MSW_ENABLED === 'true') { const { worker } = await import('./browser'); return await worker.start({ onUnhandledRequest: 'bypass', }); - } else { - console.log('MSW is disabled'); } } diff --git a/apps/duri/src/pages/My/MyReview.tsx b/apps/duri/src/pages/My/MyReview.tsx index 9092dd57..6c0e3234 100644 --- a/apps/duri/src/pages/My/MyReview.tsx +++ b/apps/duri/src/pages/My/MyReview.tsx @@ -24,7 +24,6 @@ const MyReviewPage = () => { useEffect(() => { if (reviewListData) { - console.log(reviewListData); setReviewCount(reviewListData.reviewCnt); setReviewList(reviewListData.reviewList); } diff --git a/apps/duri/src/pages/Payment/Success.tsx b/apps/duri/src/pages/Payment/Success.tsx index f35d024f..56f669b3 100644 --- a/apps/duri/src/pages/Payment/Success.tsx +++ b/apps/duri/src/pages/Payment/Success.tsx @@ -68,8 +68,6 @@ const SuccessPage = () => { quotationId: quotationId, }; - // console.log(paymentInfo) - postPaymentConfirm(paymentInfo); } }, [verifySuccess]); diff --git a/apps/duri/src/pages/Quotation/QuotationDetail.tsx b/apps/duri/src/pages/Quotation/QuotationDetail.tsx index d2e21e5e..990bb177 100644 --- a/apps/duri/src/pages/Quotation/QuotationDetail.tsx +++ b/apps/duri/src/pages/Quotation/QuotationDetail.tsx @@ -70,8 +70,6 @@ const QuotationDetailPage = () => { setBestRatingShop(bestRatingShop); setBestShop(bestShop); setQuotationList(quotationListData.quotations); - - console.log(quotationListData); } }, [quotationListData]); diff --git a/apps/duri/src/pages/Quotation/index.tsx b/apps/duri/src/pages/Quotation/index.tsx index 527dfde3..c8d473d1 100644 --- a/apps/duri/src/pages/Quotation/index.tsx +++ b/apps/duri/src/pages/Quotation/index.tsx @@ -19,10 +19,6 @@ const QuotationPage = () => { window.scrollTo(0, 0); }, []); - useEffect(() => { - console.log(requestList); - }, [requestList]); - return (
diff --git a/apps/duri/src/pages/Review/ReviewModify.tsx b/apps/duri/src/pages/Review/ReviewModify.tsx index 6e407bc4..7dabdb0e 100644 --- a/apps/duri/src/pages/Review/ReviewModify.tsx +++ b/apps/duri/src/pages/Review/ReviewModify.tsx @@ -47,7 +47,6 @@ const ReviewModifyPage = () => { useEffect(() => { if (reviewData) { - console.log(reviewData); setPetInfo(reviewData.petInfo); setImageURL(reviewData.imgUrl); setValue('rating', reviewData.rating); diff --git a/apps/duri/src/pages/Shop/index.tsx b/apps/duri/src/pages/Shop/index.tsx index 268b24f4..64ca52ed 100644 --- a/apps/duri/src/pages/Shop/index.tsx +++ b/apps/duri/src/pages/Shop/index.tsx @@ -175,11 +175,9 @@ const Shop = () => { if (searchShops.length > 0) { setIsSearchMode(true); setShops(searchShops); - // console.log('검색결과:', searchShops); } else { setIsSearchMode(false); setShops(nearbyShops); - // console.log('내주변:', nearbyShops); } }, [searchShops, nearbyShops]); diff --git a/apps/salon/src/components/onboarding/InputSalonOwner.tsx b/apps/salon/src/components/onboarding/InputSalonOwner.tsx index 7258c9db..0e9e189f 100644 --- a/apps/salon/src/components/onboarding/InputSalonOwner.tsx +++ b/apps/salon/src/components/onboarding/InputSalonOwner.tsx @@ -362,7 +362,6 @@ const InputSalonOwner = ({