import { A, B } from '@expo/html-elements'; import * as AuthSession from 'expo-auth-session'; import React from 'react'; import { Text, View } from 'react-native'; import AuthCard from './AuthCard'; export function AuthResult({ result }: any) { if (!result) { return null; } return ( {Object.keys(result).map((key) => { const value = result[key]; if (['_', '#', ''].includes(key)) return null; return ; })} ); } export function AuthSection({ title, request, result, tokenResponse, promptAsync, useProxy, disabled, }: { title: string; request: null | AuthSession.AuthRequest; result: null | AuthSession.AuthSessionResult; tokenResponse?: null | AuthSession.TokenResponse; promptAsync: ( options?: AuthSession.AuthRequestPromptOptions ) => Promise; useProxy?: boolean; disabled?: boolean; }) { // @ts-ignore const params = result?.params; return ( promptAsync({ useProxy, projectNameForProxy: '@community/native-component-list', // Tint the controller toolbarColor: color, // iOS -- unused, possibly should remove the types controlsColor: color, secondaryToolbarColor: color, }) } /> ); } export function KVText({ k, v, href, ...props }: any) { if (href) { return ( {k} {v} ); } return ( {k}: {JSON.stringify(v, null, '\t')} ); }