This pull request introduces a new theme context for managing light and dark themes across the application and refactors the code to use this new context. Additionally, it includes updates to translations and dependencies.
Theme Management:
Introduced ThemeContext and ThemeProvider to manage light and dark themes. (frontend/context/ThemeContext.tsx)
Updated various components to use the new useTheme hook from ThemeContext instead of react-native-paper. (frontend/app/(tabs)/_layout.tsx, frontend/app/(tabs)/groups.tsx, frontend/app/(tabs)/lists.tsx, frontend/app/(tabs)/profile.tsx, frontend/app/_layout.tsx, frontend/app/index.tsx) [1][2][3][4][5][6][7][8][9][10][11]
Translations:
Added new translation keys for welcoming users and language selection in English and Dutch. (frontend/locales/en/translation.json, frontend/locales/nl/translation.json) [1][2]
Dependencies:
Added @react-native-async-storage/async-storage for persisting theme preferences. (frontend/package.json, frontend/package-lock.json) [1][2][3][4][5]
Code Cleanup:
Removed the obsolete useThemeColor hook. (frontend/hooks/useThemeColor.ts)
Standardized quotes and formatting across files. (frontend/app/(tabs)/_layout.tsx, frontend/hooks/useColorScheme.web.ts) [1][2]
This pull request introduces a new theme context for managing light and dark themes across the application and refactors the code to use this new context. Additionally, it includes updates to translations and dependencies.
Theme Management:
ThemeContext
andThemeProvider
to manage light and dark themes. (frontend/context/ThemeContext.tsx
)useTheme
hook fromThemeContext
instead ofreact-native-paper
. (frontend/app/(tabs)/_layout.tsx
,frontend/app/(tabs)/groups.tsx
,frontend/app/(tabs)/lists.tsx
,frontend/app/(tabs)/profile.tsx
,frontend/app/_layout.tsx
,frontend/app/index.tsx
) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Translations:
frontend/locales/en/translation.json
,frontend/locales/nl/translation.json
) [1] [2]Dependencies:
@react-native-async-storage/async-storage
for persisting theme preferences. (frontend/package.json
,frontend/package-lock.json
) [1] [2] [3] [4] [5]Code Cleanup:
useThemeColor
hook. (frontend/hooks/useThemeColor.ts
)frontend/app/(tabs)/_layout.tsx
,frontend/hooks/useColorScheme.web.ts
) [1] [2]