import React from "react"; import { Container, HStack, Text, VStack, IContainerProps, Spinner, Link, View } from "native-base"; import type { CredentialSubjectsByType } from "@gooddollar/web3sdk-v2"; import { withTheme } from "../../../theme/hoc/withTheme"; import { openLink } from "@gooddollar/web3sdk-v2"; import { TransButton, TransHeading, TransText, TransTitle } from "../../../core/layout"; import { TxModal } from "../../../core/web3/modals"; import { BasePressable } from "../../../core/buttons"; import { GoodIdCard } from "../components"; import { Image } from "../../../core/images"; import DollarIcon from "../../../assets/images/goodid/dollar2.png"; import GlobusIcon from "../../../assets/images/goodid/globus.png"; import HeartsIcon from "../../../assets/images/goodid/hearts.png"; import StopWatchIcon from "../../../assets/images/goodid/stopwatch.png"; import InfoIcon from "../../../assets/images/goodid/info.png"; import UbiIcon from "../../../assets/images/goodid/ubi.png"; export interface OnboardScreenProps { account: string; isPending: boolean; isWhitelisted?: boolean; certificateSubjects: CredentialSubjectsByType; expiryDate?: string; name?: string; onAccept: () => void; innerContainer?: any; fontStyles?: any; } const accessList = [ { label: /*i18n*/ { id: "Crypto UBI", comment: "GoodID feature access list" }, icon: UbiIcon }, { label: /*i18n*/ { id: "Humanitarian funds", comment: "GoodID feature access list" }, icon: HeartsIcon }, { label: /*i18n*/ { id: "Climate relief disbursements", comment: "GoodID feature access list" }, icon: GlobusIcon }, { label: /*i18n*/ { id: "Financial services", comment: "GoodID feature access list" }, icon: DollarIcon } ]; // const ImageTest = (props: any) => ; //todo: define component style configuration /** * OnboardScreen shown to all users who don't have good-id certificate yet * Certificates check should be done before and only show this screen when they don't exist * @param {string} account - user's account address * @param {function} onAccept - callback for alternative in-app navigation for the gooddollar wallet * @param {object} innerContainer - styles for the inner container * @param {object} fontStyles - styles for the text elements */ export const OnboardScreen = withTheme({ name: "OnboardScreen" })( ({ account, isPending, isWhitelisted, certificateSubjects, expiryDate, onAccept, innerContainer, fontStyles, name, ...props }: OnboardScreenProps & IContainerProps) => { const { listLabel, poweredBy } = fontStyles ?? {}; if (isWhitelisted === undefined) return ; const titleCopy = isWhitelisted ? /*i18n*/ "Renew your GoodID to claim UBI" : /*i18n*/ "Get your GoodID to claim UBI"; return ( {account ? ( ) : null} {accessList.map(({ label, icon }, index) => ( ))} Terms of Use ), privy: ( Privacy Policy ) }} /> openLink("https://gooddollar.org/", "_blank")}> ); } );