ios: header home
This commit is contained in:
@@ -7,19 +7,23 @@ import EventHome from "@/components/home/eventHome";
|
||||
import FiturHome from "@/components/home/fiturHome";
|
||||
import { HeaderRightHome } from "@/components/home/headerRightHome";
|
||||
import ProjectHome from "@/components/home/projectHome";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetProfile } from "@/lib/api";
|
||||
import { setEntities } from "@/lib/entitiesSlice";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { Stack } from "expo-router";
|
||||
import { useEffect } from "react";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
import { Platform, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
|
||||
export default function Home() {
|
||||
const entities = useSelector((state: any) => state.entities)
|
||||
const dispatch = useDispatch()
|
||||
const { token, decryptToken } = useAuthSession()
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
useEffect(() => {
|
||||
handleUserLogin()
|
||||
@@ -35,10 +39,13 @@ export default function Home() {
|
||||
<Stack.Screen
|
||||
options={{
|
||||
title: 'Home',
|
||||
headerLeft: () => <></>,
|
||||
headerTitle: entities.village,
|
||||
headerRight: () => <HeaderRightHome />,
|
||||
headerTitleAlign: 'left',
|
||||
header: () => (
|
||||
<View style={[Styles.rowItemsCenter, Styles.ph20, Platform.OS === 'ios' ? Styles.pb07 : Styles.pb13, { backgroundColor: '#19345E', paddingTop: Platform.OS === 'ios' ? insets.top : 10 }]}>
|
||||
<Text style={Styles.textHeaderHome}>{entities.village}</Text>
|
||||
<HeaderRightHome />
|
||||
</View>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<ScrollView>
|
||||
|
||||
Reference in New Issue
Block a user