From b98c50cea8aaecd0ba3b431d7b23492812662d57 Mon Sep 17 00:00:00 2001 From: TengkuAchmad Date: Mon, 24 Nov 2025 20:22:01 +0700 Subject: [PATCH] refactor(payments): remove indomaret support and update navigation --- src/app/router.tsx | 4 ++-- src/features/payments/components/PaymentLogos.tsx | 2 +- src/features/payments/lib/navigation.ts | 4 ++-- src/pages/NotFoundPage.tsx | 3 ++- src/pages/PayPage.tsx | 3 ++- src/pages/PaymentStatusPage.tsx | 2 +- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/router.tsx b/src/app/router.tsx index 3b32ad3..5cc3e8a 100644 --- a/src/app/router.tsx +++ b/src/app/router.tsx @@ -1,6 +1,6 @@ import { createBrowserRouter, RouterProvider } from 'react-router-dom' import { AppLayout } from './AppLayout' -import { CheckoutPage } from '../pages/CheckoutPage' +// import { CheckoutPage } from '../pages/CheckoutPage' import { PaymentStatusPage } from '../pages/PaymentStatusPage' import { PaymentHistoryPage } from '../pages/PaymentHistoryPage' import { NotFoundPage } from '../pages/NotFoundPage' @@ -15,7 +15,7 @@ const router = createBrowserRouter([ errorElement:
Terjadi kesalahan. Coba muat ulang.
, children: [ { index: true, element: }, - { path: 'checkout', element: }, + // { path: 'checkout', element: }, { path: 'pay/:token', element: }, { path: 'payments/:orderId/status', element: }, { path: 'history', element: }, diff --git a/src/features/payments/components/PaymentLogos.tsx b/src/features/payments/components/PaymentLogos.tsx index ec88161..b2a55dc 100644 --- a/src/features/payments/components/PaymentLogos.tsx +++ b/src/features/payments/components/PaymentLogos.tsx @@ -103,7 +103,7 @@ export function CStoreLogosRow({ compact = false, size }: { compact?: boolean; s return (
- + {/* */}
) } diff --git a/src/features/payments/lib/navigation.ts b/src/features/payments/lib/navigation.ts index 1d888e9..0363e42 100644 --- a/src/features/payments/lib/navigation.ts +++ b/src/features/payments/lib/navigation.ts @@ -4,7 +4,7 @@ export function usePaymentNavigation() { const navigate = useNavigate() return { toCheckout() { - navigate('/checkout') + window.location.assign('https://erpskrip.id/pembayaran-pelanggan') }, toStatus(orderId: string, method?: string) { const qs = method ? `?m=${encodeURIComponent(method)}` : '' @@ -14,4 +14,4 @@ export function usePaymentNavigation() { navigate('/history') }, } -} \ No newline at end of file +} diff --git a/src/pages/NotFoundPage.tsx b/src/pages/NotFoundPage.tsx index 8f82e65..2a4f80c 100644 --- a/src/pages/NotFoundPage.tsx +++ b/src/pages/NotFoundPage.tsx @@ -5,7 +5,8 @@ export function NotFoundPage() {

Halaman tidak ditemukan

Periksa URL atau kembali ke checkout.

- Kembali ke Checkout + {/* Kembali ke Checkout */} + Kembali
) } \ No newline at end of file diff --git a/src/pages/PayPage.tsx b/src/pages/PayPage.tsx index 715d64e..c941c7e 100644 --- a/src/pages/PayPage.tsx +++ b/src/pages/PayPage.tsx @@ -179,7 +179,8 @@ export function PayPage() {
Pilih toko untuk membuat kode pembayaran
- {(['alfamart', 'indomaret'] as const).map((st) => ( + {/* {(['alfamart', 'indomaret'] as const).map((st) => ( */} + {(['alfamart'] as const).map((st) => ( - +
{!Env.API_BASE_URL && (