diff --git a/Auth/InsufficientPermissions.tsx b/Auth/InsufficientPermissions.tsx new file mode 100644 index 0000000..df89778 --- /dev/null +++ b/Auth/InsufficientPermissions.tsx @@ -0,0 +1,104 @@ +import MaterialIcons from '@react-native-vector-icons/material-icons'; +import React, { useState } from 'react'; +import { Button, Modal, StyleSheet, Text, View } from 'react-native'; + +type InsufficientPermissionsProps = { + featureName: string, + onRetry: () => void, + missingPermissions: string[], + requiredPermissions: string[], +}; + +function InsufficientPermissions({ featureName, onRetry, + missingPermissions, requiredPermissions }: InsufficientPermissionsProps) { + const [detailsVisible, setDetailsVisible] = useState(false); + + type PermissionDetailsListProps = { + permissions: string[], + hasPermission: boolean + }; + const PermissionDetailsList = ({permissions, hasPermission} : PermissionDetailsListProps) => { + return permissions.map((permission, index) => ( + + {hasPermission? + + : + + } + {permission} + + )); + } + + const PermissionDetailsDialog = () => { + return ( + + + + Required Permissions + + + +