Files
App/components/Settings/component.tsx
Violet Caulfield a08e66546c Offline Mode MVP (#272)
* OfflineMode

* Template addition and Fixes

* More Changes

* More Changes

* smol updates to provider

run yarn format

* update internet connection watcher colors and verbiage

remove react native file access dependency

* Offline changes

* UI tweaks for offline indicator

* get jest to pass

---------

Co-authored-by: Ritesh Shukla <ritesh.shukla2@129net231.unica.it>
Co-authored-by: Ritesh Shukla <ritesh.shukla2@M-LD4JMWLW26.local>
Co-authored-by: Ritesh Shukla <75062358+riteshshukla04@users.noreply.github.com>
2025-04-22 12:07:55 -05:00

44 lines
1.0 KiB
TypeScript

import React from 'react'
import { ScrollView } from 'tamagui'
import SignOut from './helpers/sign-out'
import { NativeStackNavigationProp } from '@react-navigation/native-stack'
import { StackParamList } from '../types'
import { useSafeAreaFrame } from 'react-native-safe-area-context'
import { FlatList } from 'react-native'
import IconCard from '../Global/helpers/icon-card'
import Categories from './categories'
import { StorageBar } from '../Storage'
export default function Root({
navigation,
}: {
navigation: NativeStackNavigationProp<StackParamList>
}): React.JSX.Element {
const { width } = useSafeAreaFrame()
return (
<FlatList
contentInsetAdjustmentBehavior='automatic'
data={Categories}
numColumns={2}
renderItem={({ index, item }) => (
<IconCard
name={item.iconName}
caption={item.name}
width={width / 2.1}
onPress={() => {
navigation.navigate(item.name, item.params)
}}
largeIcon
/>
)}
ListFooterComponent={
<>
<StorageBar />
<SignOut />
</>
}
/>
)
}