implemt QRBottomSheet
This commit is contained in:
@@ -10,7 +10,6 @@ import { CustomAmountChoiceBottomSheet } from "./splitBill/CustomAmountChoiceBot
|
||||
import { EqualltyChoiceBottomSheet } from "./splitBill/EqualltyChoiceBottomSheet";
|
||||
import { PayForYourItemsChoiceBottomSheet } from "./splitBill/PayForYourItemsChoiceBottomSheet";
|
||||
import { SplitBillChoiceBottomSheet } from "./splitBill/SplitBillChoiceBottomSheet";
|
||||
import { QRBottomSheet } from "./splitBill/QRBottomSheet";
|
||||
|
||||
type SplitWay = "customAmount" | "equality" | "payForItems" | null;
|
||||
|
||||
@@ -27,7 +26,6 @@ export default function PayButton({ form }: { form: FormInstance }) {
|
||||
const [isCustomAmountOpen, setIsCustomAmountOpen] = useState(false);
|
||||
const [isEqualityOpen, setIsEqualityOpen] = useState(false);
|
||||
const [isPayForItemsOpen, setIsPayForItemsOpen] = useState(false);
|
||||
const [isQROpen, setIsQROpen] = useState(false);
|
||||
|
||||
const handleSplitBillClick = useCallback(() => {
|
||||
if (selectedSplitWay === "customAmount") {
|
||||
@@ -105,9 +103,6 @@ export default function PayButton({ form }: { form: FormInstance }) {
|
||||
setIsCustomAmountOpen(false);
|
||||
}}
|
||||
onRemoveSplitWay={handleRemoveSplitWay}
|
||||
onSave={() => {
|
||||
setIsQROpen(true);
|
||||
}}
|
||||
/>
|
||||
|
||||
<EqualltyChoiceBottomSheet
|
||||
@@ -116,21 +111,15 @@ export default function PayButton({ form }: { form: FormInstance }) {
|
||||
setIsEqualityOpen(false);
|
||||
}}
|
||||
onRemoveSplitWay={handleRemoveSplitWay}
|
||||
onSave={() => {
|
||||
setIsQROpen(true);
|
||||
}}
|
||||
/>
|
||||
|
||||
<PayForYourItemsChoiceBottomSheet
|
||||
isOpen={isPayForItemsOpen}
|
||||
onClose={() => {
|
||||
setIsPayForItemsOpen(false);
|
||||
setIsQROpen(true);
|
||||
}}
|
||||
onRemoveSplitWay={handleRemoveSplitWay}
|
||||
/>
|
||||
|
||||
<QRBottomSheet isOpen={isQROpen} onClose={() => setIsQROpen(false)} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user