import React from "react";
import {
View,
Text,
ScrollView,
TouchableOpacity,
useColorScheme,
Switch,
} from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { Ionicons } from "@expo/vector-icons";
interface SettingRowProps {
icon: keyof typeof Ionicons.glyphMap;
label: string;
value?: string;
toggle?: boolean;
toggleValue?: boolean;
onToggle?: (v: boolean) => void;
onPress?: () => void;
accent?: string;
}
{/*// TODO add logic idk im still missing a home/login screen*/}
function SettingRow({
icon,
label,
value,
toggle,
toggleValue,
onToggle,
onPress,
accent,
}: SettingRowProps) {
const scheme = useColorScheme();
const dark = scheme === "dark";
const iconColor = accent ?? (dark ? "#706D67" : "#8A8278");
return (
{label}
{toggle ? (
) : value ? (
{value}
) : (
)}
);
}
function SectionLabel({ title }: { title: string }) {
const dark = useColorScheme() === "dark";
return (
{title}
);
}
export default function Profile() {
const [notifications, setNotifications] = React.useState(true);
const [digest, setDigest] = React.useState(false);
const scheme = useColorScheme();
const dark = scheme === "dark";
return (
{/* Avatar + name block */}
{/*// TODO*/}
{/* Avatar placeholder */}
📰
Get Name here idk
{/*// TODO*/}
aaa@aaaq.com
{/* Stats row */}
{[
//TODO add stats tracked
{ label: "Subscribed", value: "5" },
{ label: "Read", value: "128" },
{ label: "Saved", value: "34" },
].map((stat) => (
{stat.value}
{stat.label}
))}
{/* Settings sections */}
{}}
accent={dark ? "#4EC992" : "#2E9E6B"}
/>
{}}
/>
{/*
{}}
/>
*/}
{}}
/>
{/* Sign out */}
Sign out
);
}