From 4aaf37a133734bd1ef3bf3529218e76065b5f201 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Wed, 4 Sep 2024 15:01:55 +0900 Subject: [PATCH 1/7] chore: delete S3 deploy yml --- .github/workflows/s3Deploy.yml | 37 ---------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .github/workflows/s3Deploy.yml diff --git a/.github/workflows/s3Deploy.yml b/.github/workflows/s3Deploy.yml deleted file mode 100644 index 8899043..0000000 --- a/.github/workflows/s3Deploy.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: eollugage-pc Deploy To S3 - -on: - push: - branches: - - main - -jobs: - publish-eollugage-pc: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 21 - - - name: Put Env - run: echo ${{ secrets.ENV }} > .env - - - name: Install dependencies - run: yarn install - - - name: Build React - run: yarn env-build - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ap-northeast-2 - - - name: Upload to S3 - run: aws s3 sync --region ap-northeast-2 ./build s3://s3-eollugage-pc --delete From 3095ca161d6c289d3602a64b04b07dff9284043a Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Wed, 4 Sep 2024 15:22:37 +0900 Subject: [PATCH 2/7] =?UTF-8?q?fix:=20PATCH=20=ED=9B=84=20=EB=B0=94?= =?UTF-8?q?=EB=A1=9C=20GET=20=EC=95=88=20=EB=90=98=EB=8A=94=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/paymentHistory.ts | 2 +- src/hooks/apis/paymentHistory.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/apis/paymentHistory.ts b/src/apis/paymentHistory.ts index 902ba5a..19ae768 100644 --- a/src/apis/paymentHistory.ts +++ b/src/apis/paymentHistory.ts @@ -23,7 +23,7 @@ export interface OrderHistory { type PaymentHistoryStatus = 'WAITING' | 'PROCESS' | 'HISTORY' type OrderHistoryStatus = 'APPROVED' | 'PENDING' | 'DISAPPROVED' | 'HISTORY' -async function getPaymentHistory(storeId: string, status?: string, filter: string = 'ALL'): Promise { +async function getPaymentHistory(storeId: string, filter: string, status?: string): Promise { const statusQuery = status ? `&status=${status}` : '' const { data } = await api.get(`/api/v1/stores/${storeId}/payment-histories?filter=${filter}${statusQuery}`) return data diff --git a/src/hooks/apis/paymentHistory.ts b/src/hooks/apis/paymentHistory.ts index cf3bfe4..2ae2fdd 100644 --- a/src/hooks/apis/paymentHistory.ts +++ b/src/hooks/apis/paymentHistory.ts @@ -18,9 +18,9 @@ function useGetWaitingOrder() { const { data, isLoading } = useQuery({ queryKey: ['getWaitingOrder'], - queryFn: () => getPaymentHistory(storeId), refetchInterval: 5000, refetchIntervalInBackground: true, + queryFn: () => getPaymentHistory(storeId, 'ALL'), }) useEffect(() => { @@ -38,12 +38,12 @@ function useGetWaitingOrder() { return { data, isLoading } } -function useGetPaymentHistory(status: string, filter?: string) { +function useGetPaymentHistory(status: string, filter: string = 'ALL') { const [storeId] = useAtom(storeIdAtom) const { data, isLoading } = useQuery({ queryKey: ['getPaymentHistory', status, filter], - queryFn: () => getPaymentHistory(storeId, status, filter), + queryFn: () => getPaymentHistory(storeId, filter, status), }) return { data, isLoading } @@ -69,7 +69,8 @@ function usePatchPaymentHistory(tableNumber?: number) { patchPaymentHistory(storeId, paymentHistoryId, orderHistoryId, status), onSuccess: () => { setModalShow(false) - queryClient.invalidateQueries({ queryKey: ['getPaymentHistory', 'getWaitingOrder'] }) + queryClient.invalidateQueries({ queryKey: ['getWaitingOrder'] }) + queryClient.invalidateQueries({ queryKey: ['getPaymentHistory', 'PROCESS', 'ALL'] }) }, onError: (error, variables) => { const axiosError = error as AxiosError From f1d0c1ee5e4d248f2c589fb54df902ad40f03238 Mon Sep 17 00:00:00 2001 From: iOdiO89 <117376841+iOdiO89@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:47:10 +0900 Subject: [PATCH 3/7] =?UTF-8?q?chore:=20meta=20data=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index ae43a8c..c7b09e0 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ - +