Skip to content

Commit

Permalink
feat(expo/payment-confirm): dialog message
Browse files Browse the repository at this point in the history
  • Loading branch information
mrevanzak committed Dec 4, 2023
1 parent 0721114 commit 37e0d1c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions apps/expo/src/app/(app)/payment-confirm.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from "react";
import React, { useState } from "react";
import { ActivityIndicator } from "react-native";
import {
AnimatedImage,
AnimatedScanner,
BorderRadiuses,
Button,
Dialog,
KeyboardAwareScrollView,
Text,
View,
Expand Down Expand Up @@ -33,6 +34,8 @@ export default function PaymentConfirmScreen() {
const router = useRouter();
const { orderId } = useLocalSearchParams<{ orderId: string }>();

const [showDialog, setShowDialog] = useState(false);

const { image, onSelectImage, onUpload, uploadProggres } = useSelectImage();

const utils = api.useUtils();
Expand Down Expand Up @@ -64,7 +67,7 @@ export default function PaymentConfirmScreen() {
onSettled: () => {
void utils.order.showOrder.invalidate();
toast.dismiss();
router.back();
setShowDialog(true);
},
},
);
Expand Down Expand Up @@ -149,6 +152,14 @@ export default function PaymentConfirmScreen() {
br40
disabled={!!uploadProggres || isPending}
/>
<Dialog visible={showDialog} onDismiss={() => router.back()}>
<View padding-s4 bg-white br40>
<Text text70BO center>
Terima kasih sudah melakukan pembayaran. Admin akan segera
memproses transaksi kamu.
</Text>
</View>
</Dialog>
</KeyboardAwareScrollView>
</View>
);
Expand Down

0 comments on commit 37e0d1c

Please sign in to comment.