Skip to Content

⚙️ App Settings Screen

An example implementation of the AppSettings component, designed to display user profile information and customizable menu settings in a modular, theme-aware layout for OTT apps.


📸 Preview

App Setting Light Preview
App Setting Dark Preview

📡 API Call Methods

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

🧪 The following API methods are typically used in the settings screen:


🚀 Usage Example

AppSettingsScreen.tsx
import React from "react"; import { AppSettings, SafeAreaWrapper, } from "@zezosoft/zezo-ott-react-native-ui-kit"; import { Text, Alert } from "react-native"; const AppSettingsScreen = () => { // 🧑‍💼 Replace `userInfo` fields with live data from `getZezoOtt().auth.whoami()` const 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"), }; const menuItems = [ { key: "my_account", label: "My Account", type: "pressable", onPress: () => console.log("Navigate to My Account"), }, { key: "logout", label: "Logout", type: "pressable", onPress: () => Alert.alert("Logout Pressed"), }, ]; return ( <SafeAreaWrapper> <AppSettings title="Settings" userInfo={userInfo} menuItems={menuItems} isLoading={false} renderFooter={() => <Text>Version 1.0</Text>} /> </SafeAreaWrapper> ); }; export default AppSettingsScreen;

⚙️ Props Summary (AppSettings Props)

PropTypeDescription
titlestringScreen title
userInfoUserInfoUser profile object
menuItemsMenuItem[]Array of pressable/toggle menu items
themeAppThemeOptional theme override
isLoadingbooleanControls skeleton loading state
onMenuItemPress(item: MenuItem) => voidCallback when menu item is selected
renderHeader() => React.ReactNodeOptional custom header renderer
renderFooter() => React.ReactNodeOptional custom footer renderer

👤 User Info Object

{ 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"), }
  • Sourced from a dummy API or static data.
  • Supports avatar and edit callback.
  • Skeleton loader shows during data fetch if isLoading is true.

📋 Menu Items

KeyLabelTypeAction
my_accountMy AccountPressableNavigate to profile screen
logoutLogoutPressableShows alert on press

🔁 Logout Flow

  1. Tap logout item.
  2. Shows alert dialog.
  3. (In production: connect to logout API)

🎨 Theme & Customization

PropDescription
menuItemStyleStyle for menu item container, icon, and text
userInfoTextStyleOverrides for name/email text in user section
avatarComponentOptional custom avatar renderer
onBackPressCallback for top back button (if implemented)
renderHeaderInject custom header JSX
renderFooterInject footer JSX (e.g., version info)

✅ Summary

  • 🧩 Modular screen using reusable AppSettings component
  • 📄 Displays static or API-based user info
  • ⚡ Handles logout and user actions
  • 🎨 Customizable props and style hooks

✍️ Created by Naresh Dhamu – Powered by ZezoSoft

Last updated on