import React, { useEffect, useState } from "react"; import { View, ActivityIndicator, ScrollView, Image } from "react-native"; import { ScreenWrapper } from "@/components/ScreenWrapper"; import { StandardHeader } from "@/components/StandardHeader"; import { Text } from "@/components/ui/text"; import { Card, CardContent } from "@/components/ui/card"; import { api } from "@/lib/api"; export default function CompanyDetailsScreen() { const [loading, setLoading] = useState(true); const [company, setCompany] = useState(null); useEffect(() => { const load = async () => { try { setLoading(true); const res = await api.company.get(); setCompany(res?.data ?? res); } finally { setLoading(false); } }; load(); }, []); return ( {loading ? ( ) : ( {/* Logo */} {company?.logoPath && ( )} {/* Basic Info */} Company Name {company?.name ?? "—"} {company?.tin && ( TIN {company.tin} )} {/* Contact */} Contact Information Phone {company?.phone ?? "—"} Email {company?.email ?? "—"} {company?.website && ( Website {company.website} )} {/* Address */} Address Street Address {company?.address ?? "—"} City {company?.city ?? "—"} State {company?.state ?? "—"} Zip Code {company?.zipCode ?? "—"} Country {company?.country ?? "—"} {/* System Info */} System Information User ID {company?.userId ?? "—"} Created {company?.createdAt ? new Date(company.createdAt).toLocaleString() : "—"} Last Updated {company?.updatedAt ? new Date(company.updatedAt).toLocaleString() : "—"} )} ); }