diff --git a/src/app/router.tsx b/src/app/router.tsx
index 4dd5a2a..3b32ad3 100644
--- a/src/app/router.tsx
+++ b/src/app/router.tsx
@@ -4,7 +4,8 @@ import { CheckoutPage } from '../pages/CheckoutPage'
import { PaymentStatusPage } from '../pages/PaymentStatusPage'
import { PaymentHistoryPage } from '../pages/PaymentHistoryPage'
import { NotFoundPage } from '../pages/NotFoundPage'
-import { DemoStorePage } from '../pages/DemoStorePage'
+// import { DemoStorePage } from '../pages/DemoStorePage'
+import { InitPage } from '../pages/InitialPage'
import { PayPage } from '../pages/PayPage'
const router = createBrowserRouter([
@@ -13,7 +14,7 @@ const router = createBrowserRouter([
element: ,
errorElement:
Terjadi kesalahan. Coba muat ulang.
,
children: [
- { index: true, element: },
+ { index: true, element: },
{ path: 'checkout', element: },
{ path: 'pay/:token', element: },
{ path: 'payments/:orderId/status', element: },
diff --git a/src/features/payments/components/PaymentSheet.tsx b/src/features/payments/components/PaymentSheet.tsx
index f622585..14cecf6 100644
--- a/src/features/payments/components/PaymentSheet.tsx
+++ b/src/features/payments/components/PaymentSheet.tsx
@@ -64,22 +64,21 @@ export function PaymentSheet({ merchantName = 'Simaya', orderId, amount, expireA
- {/* Amount panel */}
+
{expanded && (
-
Total
+
Total
{formatCurrencyIDR(amount)}
Order ID #{orderId}
)}
- {/* Body */}
+
{children}
- {/* Sticky CTA (mobile-friendly) */}
{showStatusCTA && (
{
const html = document.documentElement
try {
@@ -9,11 +9,9 @@ import './styles/globals.css'
html.classList.remove('dark')
}
document.body.classList.remove('dark')
- // Hint browsers to prefer light color scheme
html.style.colorScheme = 'light'
html.setAttribute('data-theme', 'light')
} catch {
- // noop
}
})()
import { AppRouter } from './app/router'
diff --git a/src/pages/InitialPage.tsx b/src/pages/InitialPage.tsx
new file mode 100644
index 0000000..feb4db1
--- /dev/null
+++ b/src/pages/InitialPage.tsx
@@ -0,0 +1,13 @@
+export function InitPage() {
+ return (
+
+
+
+
+
Simaya Midtrans
+
Payment Service
+
+
+
+ )
+}
diff --git a/src/pages/PayPage.tsx b/src/pages/PayPage.tsx
index 77a2574..715d64e 100644
--- a/src/pages/PayPage.tsx
+++ b/src/pages/PayPage.tsx
@@ -53,7 +53,7 @@ export function PayPage() {
}
}, [token])
- const merchantName = useMemo(() => 'Simaya Retail', [])
+ const merchantName = useMemo(() => '', [])
const isExpired = expireAt ? Date.now() > expireAt : false
const enabledMap: Record
= useMemo(() => {
@@ -88,16 +88,17 @@ export function PayPage() {
>
{msg}
-
+
{ try { window.location.reload() } catch { } }}
+ className="w-full sm:w-auto"
>
Muat ulang
Hubungi Admin
@@ -123,7 +124,6 @@ export function PayPage() {
onSelect={(m) => {
setSelectedMethod(m as Method)
if (m === 'bank_transfer' || m === 'cstore') {
- // Panel pemilihan bank/toko akan muncul di bawah item, dan lanjut ke step 3 setelah memilih
} else if (m === 'cpay') {
try {
window.open('https://play.google.com/store/apps/details?id=com.cifo.walanja', '_blank')
@@ -148,7 +148,7 @@ export function PayPage() {
return (
Pilih bank untuk membuat Virtual Account
-
+
{(['bca', 'bni', 'bri', 'cimb', 'mandiri', 'permata'] as BankKey[]).map((bk) => (
{ setCurrentStep(3); setIsBusy(false) }, 300)
}}
- className="rounded border border-gray-300 bg-white p-2 flex items-center justify-center overflow-hidden hover:bg-gray-100"
+ className="rounded border border-gray-300 bg-white p-3 md:p-2 w-full flex items-center justify-center overflow-hidden hover:bg-gray-100"
aria-label={`Pilih bank ${bk.toUpperCase()}`}
>
@@ -188,7 +188,7 @@ export function PayPage() {
setIsBusy(true)
setTimeout(() => { setCurrentStep(3); setIsBusy(false) }, 300)
}}
- className="rounded border border-gray-300 bg-white p-2 flex items-center justify-center hover:bg-gray-100"
+ className="rounded border border-gray-300 bg-white p-3 md:p-2 w-full flex items-center justify-center hover:bg-gray-100"
aria-label={`Pilih toko ${st.toUpperCase()}`}
>
{st === 'alfamart' ? : }
diff --git a/src/services/api.ts b/src/services/api.ts
index f523409..9b24ca1 100644
--- a/src/services/api.ts
+++ b/src/services/api.ts
@@ -129,8 +129,6 @@ export async function getPaymentLinkPayload(token: string): Promise