import React from "react"; import { Center, Link, Text, View, VStack } from "native-base"; import type { InterfaceViewProps } from "native-base/lib/typescript/components/basic/View/types"; import { useWizard } from "react-use-wizard"; import { AsyncStorage } from "@gooddollar/web3sdk-v2"; import { TransButton, TransText, TransTitle } from "../../../core/layout"; import { Image } from "../../../core/images"; import BillyGrin from "../../../assets/images/billy-grin.png"; import { withTheme } from "../../../theme/hoc/withTheme"; import { Platform } from "react-native"; export const OffersAgreement = withTheme({ name: "OffersAgreement" })( ({ styles, ...props }: InterfaceViewProps & { styles?: any; onDataPermission: (accepted: string) => Promise }) => { const { nextStep } = useWizard(); const { buttonContainer, image } = styles ?? {}; const resizeMode = image.resizeMode ?? "contain"; const handleNo = () => handleAccept("false"); const handleYes = async () => void handleAccept("true"); // we need the offersAgreement acceptance for running checkAvailableOffers const handleAccept = async (accepted: string) => { await AsyncStorage.removeItem("goodid_disputedSubjects"); await props.onDataPermission(accepted); void nextStep(); }; return (
Privacy Policy ) }} />
); } );