Skip to Content
React NativeComponentSettingAccount

👤 Account

An example implementation of the Account UI component using mock user data. This screen showcases how to render profile details, subscription information, and account actions such as linked devices and logout.


✨ Features

  • 👤 Displays user name, avatar, and contact info
  • 💳 Shows current subscription and next billing date
  • 🛡️ Linked devices and logout actions
  • 🧱 Sections for membership and security
  • 🎨 Works with light/dark themes
  • 🔄 Replace mock data with real API later

📸 Preview

AccountScreen Light Preview
AccountScreen Dark Preview

📡 API Call Methods

⚙️ First, set up the getZezoOtt API client: API Client Setup

🧪 The following API methods are used to fetch user data:


🚀 Usage Example

AccountScreen.tsx
import React from "react"; import { Account, SafeAreaWrapper, } from "@zezosoft/zezo-ott-react-native-ui-kit"; import { MonitorSmartphone, LogOut } from "lucide-react-native"; const AccountScreen = () => { return ( <SafeAreaWrapper> <Account // 🧑‍💼 Replace `userInfo` fields with live data from `getZezoOtt().auth.whoami()` userInfo={{ name: "Naresh Dhamu", avatarUri: "https://avatars.githubusercontent.com/u/89912059?s=400&u=887606d77116716a20e891cdca74c4e58ec7d60f&v=4", emailOrPhone: "nareshsuthar1229@gmail.com", onEditPress: () => console.log("Edit profile pressed"), }} isLoading={false} // Set to true while API data is loading sections={[ { title: "MEMBERSHIP", items: [ { type: "card", // 🔁 Replace title and subtitle with values from `getZezoOtt().auth.whoami().subscription` title: "Premium Plan: ₹249/month", subtitle: "Next Billing: 22 Sep 2025", }, ], }, { title: "ACCOUNT AND SECURITY", items: [ { label: "Linked Devices", subtitle: "Manage your devices", showRightIcon: true, leftIcon: <MonitorSmartphone size={22} />, onPress: () => console.log("Linked Devices pressed"), }, { label: "Log out", leftIcon: <LogOut size={22} />, onPress: () => console.log("Log out pressed"), }, ], }, ]} onBackPress={() => console.log("Back pressed")} /> </SafeAreaWrapper> ); }; export default AccountScreen;

⚙️ Props in Use

PropTypeDescription
userInfoobjectDisplays user’s name, avatar, email or phone
sectionsarrayGroups cards and action items
isLoadingbooleanEnables loading skeleton when fetching API data
onBackPressfunctionTriggers back action (e.g. navigation.goBack)

🧲 Mock Data Notes

  • Replace static fields with data from your API (whoami, subscription)
  • Use utilities like moment.js to format billing dates
  • Ideal for connecting with React Query, Zustand, or other global stores

📀 Layout Overview

  • 🔙 Back button (top-left)
  • 🧑‍💼 Avatar, name, and contact
  • 💳 Membership plan and billing info
  • ⚙️ Account actions: linked devices, logout
  • 🧱 Themed, responsive, fully typed

✍️ Created by Naresh Dhamu – Powered by ZezoSoft

Last updated on