mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
Some checks failed
🤖 Android APK Build / 🏗️ Build Android APK (push) Has been cancelled
🤖 iOS IPA Build / 🏗️ Build iOS IPA (push) Has been cancelled
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (push) Has been cancelled
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (push) Has been cancelled
🕒 Handle Stale Issues / 🗑️ Cleanup Stale Issues (push) Has been cancelled
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import type {
|
|
MaterialTopTabNavigationEventMap,
|
|
MaterialTopTabNavigationOptions,
|
|
} from "@react-navigation/material-top-tabs";
|
|
import { createMaterialTopTabNavigator } from "@react-navigation/material-top-tabs";
|
|
import type {
|
|
ParamListBase,
|
|
TabNavigationState,
|
|
} from "@react-navigation/native";
|
|
import { Stack, withLayoutContext } from "expo-router";
|
|
|
|
const { Navigator } = createMaterialTopTabNavigator();
|
|
|
|
export const Tab = withLayoutContext<
|
|
MaterialTopTabNavigationOptions,
|
|
typeof Navigator,
|
|
TabNavigationState<ParamListBase>,
|
|
MaterialTopTabNavigationEventMap
|
|
>(Navigator);
|
|
|
|
const Layout = () => {
|
|
return (
|
|
<>
|
|
<Stack.Screen options={{ title: "Live TV" }} />
|
|
<Tab
|
|
initialRouteName='programs'
|
|
keyboardDismissMode='none'
|
|
screenOptions={{
|
|
tabBarBounces: true,
|
|
tabBarLabelStyle: { fontSize: 10 },
|
|
tabBarItemStyle: {
|
|
width: 100,
|
|
},
|
|
tabBarStyle: { backgroundColor: "black" },
|
|
animationEnabled: true,
|
|
lazy: true,
|
|
swipeEnabled: true,
|
|
tabBarIndicatorStyle: { backgroundColor: "#9334E9" },
|
|
tabBarScrollEnabled: true,
|
|
}}
|
|
>
|
|
<Tab.Screen name='programs' />
|
|
<Tab.Screen name='guide' />
|
|
<Tab.Screen name='channels' />
|
|
<Tab.Screen name='recordings' />
|
|
</Tab>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Layout;
|