import React, { useCallback } from 'react'; import { Just } from 'folktale/maybe'; import { Grid, B } from 'indigo-react'; import { useWallet } from 'store/wallet'; import { useLocalRouter } from 'lib/LocalRouter'; import useCurrentPermissions from 'lib/useCurrentPermissions'; import useKeyfileGenerator from 'lib/useKeyfileGenerator'; import { ForwardButton } from 'components/Buttons'; import ViewHeader from 'components/ViewHeader'; import DownloadKeyfileButton from 'components/DownloadKeyfileButton'; export default function AdminHome() { const { push, names } = useLocalRouter(); const { urbitWallet } = useWallet(); const { bind: keyfileBind } = useKeyfileGenerator(); const { isOwner, canTransfer, isTransferProxySet } = useCurrentPermissions(); const goRedownload = useCallback(() => push(names.REDOWNLOAD), [push, names]); const goReticket = useCallback(() => push(names.RETICKET), [push, names]); const goEditPermissions = useCallback(() => push(names.EDIT_PERMISSIONS), [ push, names, ]); const goCancelTransfer = useCallback(() => push(names.CANCEL_TRANSFER), [ names, push, ]); const goTransfer = useCallback(() => push(names.TRANSFER), [names, push]); const canDownloadPassport = Just.hasInstance(urbitWallet); return ( <> Admin ยท Master Ticket Authentication required. }> Download Passport Download Arvo Keyfile Reticket Edit Permissions {isTransferProxySet ? ( Cancel Outgoing Transfer ) : ( Transfer )} ); }