diff --git a/components/account-information.tsx b/components/account-information.tsx
new file mode 100644
index 0000000..d1d0106
--- /dev/null
+++ b/components/account-information.tsx
@@ -0,0 +1,56 @@
+"use client"
+import { Clipboard, ClipboardCheck } from "lucide-react";
+import { useState } from "react";
+import { toast } from "sonner";
+import { Button } from "./ui/button";
+
+export function AccountInfomation({
+ accountNo,
+ accName,
+}: {
+ accountNo: string;
+ accName: string;
+}) {
+ const [accNo, setAccNo] = useState(false);
+ return (
+
+
+ Account Information
+
+
+
Account Name
+
{accName}
+
+
+
+
Account No
+
{accountNo}
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/components/devices-to-pay.tsx b/components/devices-to-pay.tsx
index ed545b1..04acd97 100644
--- a/components/devices-to-pay.tsx
+++ b/components/devices-to-pay.tsx
@@ -1,12 +1,10 @@
"use client";
import {
BadgeDollarSign,
- Clipboard,
- ClipboardCheck,
Loader2,
- Wallet,
+ Wallet
} from "lucide-react";
-import { useActionState, useEffect, useState } from "react";
+import { useActionState, useEffect } from "react";
import { toast } from "sonner";
import { type VerifyDevicePaymentState, verifyDevicePayment } from "@/actions/payment";
import {
@@ -19,6 +17,7 @@ import {
} from "@/components/ui/table";
import type { Payment } from "@/lib/backend-types";
import type { User } from "@/lib/types/user";
+import { AccountInfomation } from "./account-information";
import { Button } from "./ui/button";
const initialState: VerifyDevicePaymentState = {
@@ -164,42 +163,4 @@ export default function DevicesToPay({
);
}
-function AccountInfomation({
- accountNo,
- accName,
-}: {
- accountNo: string;
- accName: string;
-}) {
- const [accNo, setAccNo] = useState(false);
- return (
-
-
- Account Information
-
-
-
Account Name
-
{accName}
-
-
-
-
Account No
-
{accountNo}
-
-
-
-
- );
-}
+
diff --git a/components/topup-to-pay.tsx b/components/topup-to-pay.tsx
index d3ef110..54f93ea 100644
--- a/components/topup-to-pay.tsx
+++ b/components/topup-to-pay.tsx
@@ -1,10 +1,9 @@
"use client";
import {
BadgeDollarSign,
- ClipboardCheck,
Loader2
} from "lucide-react";
-import { useActionState, useEffect, useState } from "react";
+import { useActionState, useEffect } from "react";
import { toast } from "sonner";
import {
type VerifyTopupPaymentState,
@@ -19,6 +18,7 @@ import {
TableRow,
} from "@/components/ui/table";
import type { Topup } from "@/lib/backend-types";
+import { AccountInfomation } from "./account-information";
import { Button } from "./ui/button";
const initialState: VerifyTopupPaymentState = {
@@ -155,53 +155,4 @@ export default function TopupToPay({
);
}
-function AccountInfomation({
- accountNo,
- accName,
-}: {
- accountNo: string;
- accName: string;
-}) {
- const [accNo, setAccNo] = useState(false);
- return (
-
-
- Account Information
-
-
-
Account Name
-
{accName}
-
-
-
-
Account No
-
{accountNo}
-
-
-
-
- );
-}
+