import { Animated, Dimensions, Easing } from "react-native"; // header for screens import { Header, Icon } from "../components"; import { argonTheme, tabs } from "../constants"; import AboutScreen from "../screens/About"; import AgreementScreen from "../screens/Agreement"; import Articles from "../screens/Articles"; import Beauty from "../screens/Beauty"; import Cart from "../screens/Cart"; import Category from "../screens/Category"; import Chat from "../screens/Chat"; // drawer import CustomDrawerContent from "./Menu"; import Elements from "../screens/Elements"; import Fashion from "../screens/Fashion"; import Gallery from "../screens/Gallery"; // screens import Home from "../screens/Home"; import NotificationsScreen from "../screens/Notifications"; // Notifications import PersonalNotifications from "../screens/PersonalNotifications"; import PrivacyScreen from "../screens/Privacy"; // import Onboarding from "../screens/Onboarding"; import Pro from "../screens/Pro"; import Product from "../screens/Product"; import Profile from "../screens/Profile"; import React from "react"; import Register from "../screens/Register"; import Search from "../screens/Search"; // settings import SettingsScreen from "../screens/Settings"; import SystemNotifications from "../screens/SystemNotifications"; import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import { createDrawerNavigator } from "@react-navigation/drawer"; import { createStackNavigator } from "@react-navigation/stack"; // 事件中心页面 import { EventList, EventDetail } from "../src/screens/Events"; // 市场热点页面 import { MarketHot, SectorDetail, EventCalendar, StockDetail, TodayStats } from "../src/screens/Market"; // 认证页面 import { LoginScreen } from "../src/screens/Auth"; // 推送通知处理 import PushNotificationHandler from "../src/components/PushNotificationHandler"; const { width } = Dimensions.get("screen"); const Stack = createStackNavigator(); const Drawer = createDrawerNavigator(); const Tab = createBottomTabNavigator(); function NotificationsStack(props) { return ( ({ tabBarIcon: ({ focused, color }) => { let iconName; if (route.name === "Personal") { iconName = "user"; } else if (route.name === "System") { iconName = "database"; } // You can return any component that you like here! return ( ); }, })} tabBarOptions={{ activeTintColor: argonTheme.COLORS.PRIMARY, inactiveTintColor: "gray", labelStyle: { fontFamily: "open-sans-regular", }, }} > ); } function ElementsStack(props) { return ( (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> ); } function SettingsStack(props) { return ( (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#0F172A" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> ); } function ArticlesStack(props) { return ( (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> ); } // 事件中心导航栈 function EventsStack(props) { return ( ); } // 市场热点导航栈 function MarketStack(props) { return ( ({ header: ({ navigation, scene }) => (
), headerShown: true, cardStyle: { backgroundColor: "#0F172A" }, })} /> ); } function ProfileStack(props) { return ( (
), cardStyle: { backgroundColor: "#FFFFFF" }, headerTransparent: true, }} /> (
), cardStyle: { backgroundColor: "#FFFFFF" }, }} /> (
), cardStyle: { backgroundColor: "#FFFFFF" }, }} /> ); } function HomeStack(props) { return ( (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> { const { params } = scene.descriptor; const title = (params && params.headerTitle) || "Category"; return (
); }, cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), headerTransparent: true, }} /> (
), headerTransparent: true, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> (
), cardStyle: { backgroundColor: "#F8F9FE" }, }} /> ); } function AppStack(props) { return ( } drawerStyle={{ backgroundColor: "white", width: width * 0.8, }} screenOptions={{ activeTintcolor: "white", inactiveTintColor: "#000", activeBackgroundColor: "transparent", itemStyle: { width: width * 0.75, backgroundColor: "transparent", paddingVertical: 16, paddingHorizonal: 12, justifyContent: "center", alignContent: "center", alignItems: "center", overflow: "hidden", }, labelStyle: { fontSize: 18, marginLeft: 12, fontWeight: "normal", }, }} initialRouteName="EventsDrawer" > ); } export default function OnboardingStack(props) { return ( ); }