mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 19:21:25 +02:00
Restructure standalone traces app into monorepo pattern with mobile + backend + shared types. Add NestJS backend with Drizzle ORM schema for locations, cities, places, POIs, and AI guides. Add mobile sync layer, cities tab, and guide generation UI. Fix pre-existing type errors across mobile codebase, matrix-mana-bot (sendDirectMessage), llm-playground, and all web auth stores (signUp call signature). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
799 B
TypeScript
30 lines
799 B
TypeScript
import { FontAwesome } from '@expo/vector-icons';
|
|
import { Pressable, Text, View } from 'react-native';
|
|
|
|
import { useTheme } from '../utils/themeContext';
|
|
|
|
type ThemeToggleProps = {
|
|
style?: any;
|
|
};
|
|
|
|
export const ThemeToggle: React.FC<ThemeToggleProps> = ({ style }) => {
|
|
const { isDarkMode, toggleTheme, colors } = useTheme();
|
|
|
|
return (
|
|
<Pressable
|
|
onPress={toggleTheme}
|
|
style={({ pressed }) => ({ opacity: pressed ? 0.5 : 1, ...style })}
|
|
>
|
|
<View className="flex-row items-center">
|
|
<FontAwesome
|
|
name={isDarkMode ? 'moon-o' : 'sun-o'}
|
|
size={24}
|
|
color={isDarkMode ? '#FFFFFF' : colors.primary}
|
|
/>
|
|
<Text className={`ml-2 ${isDarkMode ? 'text-white' : 'text-black'}`}>
|
|
{isDarkMode ? 'Dark Mode' : 'Light Mode'}
|
|
</Text>
|
|
</View>
|
|
</Pressable>
|
|
);
|
|
};
|