mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-19 01:28:06 +00:00
wip
This commit is contained in:
@@ -5,18 +5,29 @@ import * as NavigationBar from "expo-navigation-bar";
|
||||
import React, { useEffect } from "react";
|
||||
import { Platform, StyleSheet } from "react-native";
|
||||
|
||||
import { withLayoutContext } from "expo-router";
|
||||
|
||||
import {
|
||||
createNativeBottomTabNavigator,
|
||||
BottomSheetNavigationOptions,
|
||||
NativeBottomTabNavigationEventMap,
|
||||
NativeBottomTabNavigationOptions,
|
||||
} from "react-native-bottom-tabs/react-navigation";
|
||||
|
||||
import { withLayoutContext } from "expo-router";
|
||||
|
||||
const { Navigator } = createNativeBottomTabNavigator();
|
||||
|
||||
export const Tabs = withLayoutContext<any, typeof Navigator, any, any>(
|
||||
Navigator
|
||||
);
|
||||
import { BottomTabNavigationOptions } from "@react-navigation/bottom-tabs";
|
||||
|
||||
import type {
|
||||
ParamListBase,
|
||||
TabNavigationState,
|
||||
} from "@react-navigation/native";
|
||||
|
||||
export const NativeTabs = withLayoutContext<
|
||||
BottomTabNavigationOptions,
|
||||
typeof Navigator,
|
||||
TabNavigationState<ParamListBase>,
|
||||
NativeBottomTabNavigationEventMap
|
||||
>(Navigator);
|
||||
|
||||
export default function TabLayout() {
|
||||
useEffect(() => {
|
||||
@@ -27,34 +38,29 @@ export default function TabLayout() {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Tabs
|
||||
sidebarAdaptable
|
||||
options={{
|
||||
headerShown: false,
|
||||
}}
|
||||
>
|
||||
<Tabs.Screen redirect name="index" />
|
||||
<Tabs.Screen
|
||||
<NativeTabs sidebarAdaptable>
|
||||
<NativeTabs.Screen redirect name="index" />
|
||||
<NativeTabs.Screen
|
||||
name="(home)"
|
||||
options={{
|
||||
title: "Home",
|
||||
tabBarIcon: () => ({ sfSymbol: "house" }),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
<NativeTabs.Screen
|
||||
name="(search)"
|
||||
options={{
|
||||
title: "Search",
|
||||
tabBarIcon: () => ({ sfSymbol: "magnifyingglass" }),
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
<NativeTabs.Screen
|
||||
name="(libraries)"
|
||||
options={{
|
||||
title: "Library",
|
||||
tabBarIcon: () => ({ sfSymbol: "server.rack" }),
|
||||
}}
|
||||
/>
|
||||
</Tabs>
|
||||
</NativeTabs>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -334,6 +334,8 @@ function Layout() {
|
||||
options={{
|
||||
headerShown: false,
|
||||
title: "",
|
||||
header: () => null,
|
||||
|
||||
}}
|
||||
/>
|
||||
<Stack.Screen
|
||||
|
||||
Reference in New Issue
Block a user