import React from "react"; import { View, Text, TouchableOpacity, Linking, ScrollView, useColorScheme, } from "react-native"; import { SafeAreaView } from "react-native-safe-area-context"; import { Ionicons } from "@expo/vector-icons"; const CONTACT_EMAIL = "contact@ksan.dev"; //TODO make github page because yea const GITHUB_URL = "https://git.ksan.dev/ksan"; const APP_VERSION = "1.0.0"; export default function HelpSupport({ onClose }: { onClose: () => void }) { const dark = useColorScheme() === "dark"; const accent = dark ? "#E07B45" : "#C4622D"; const contactLinks = [ { icon: "mail-outline" as const, label: "Contact support", sub: CONTACT_EMAIL, color: dark ? "#5E9EF4" : "#3B7DD8", onPress: () => Linking.openURL(`mailto:${CONTACT_EMAIL}`), }, { icon: "logo-github" as const, label: "Submit a fix on GitHub", sub: "Open a pull request or report a bug", color: dark ? "#4EC992" : "#2E9E6B", onPress: () => Linking.openURL(GITHUB_URL), }, ]; const aboutRows = [ { label: "Version", value: APP_VERSION }, { label: "Platform", value: "React Native / Expo" }, { label: "Source code", value: "GitHub", onPress: () => Linking.openURL(GITHUB_URL) }, { label: "Contact", value: CONTACT_EMAIL, onPress: () => Linking.openURL(`mailto:${CONTACT_EMAIL}`) }, ]; return ( {/* Header */} Help & Support {/* ── Contact section ── */} Contact Need help or found something broken? Reach out directly or open an issue on GitHub. {contactLinks.map((link, index) => ( {link.label} {link.sub} ))} {/* About section */} About {/* App identity card */} 📰 ETF Oglasi Version {APP_VERSION} {/* About rows */} {aboutRows.map((row, index) => { const isLast = index === aboutRows.length - 1; const Inner = ( {row.label} {row.value} {row.onPress && ( )} ); return row.onPress ? ( {Inner} ) : ( {Inner} ); })} {/* Footer note */} Built with ♥ — contributions welcome on GitHub ); }