Add basics tabs on android

This commit is contained in:
Zoe Roux 2023-12-12 17:57:50 +01:00
parent 7403be6519
commit 7451452088
5 changed files with 53 additions and 5 deletions

View File

@ -0,0 +1,50 @@
/*
* Kyoo - A portable and vast media library solution.
* Copyright (c) Kyoo.
*
* See AUTHORS.md and LICENSE file in the project root for full license information.
*
* Kyoo is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* Kyoo is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
*/
import { Icon } from "@kyoo/primitives";
import { Tabs } from "expo-router";
import { useTheme } from "yoshiki/native";
import Home from "@material-symbols/svg-400/rounded/home.svg";
import Browse from "@material-symbols/svg-400/rounded/browse.svg";
export default function TabsLayout() {
return (
<Tabs
screenOptions={{
headerShown: false,
}}
>
<Tabs.Screen
name="index"
options={{
tabBarLabel: "Home",
tabBarIcon: ({ color, size }) => <Icon icon={Home} color={color} size={size} />,
}}
/>
<Tabs.Screen
name="browse"
options={{
tabBarLabel: "Browse",
tabBarIcon: ({ color, size }) => <Icon icon={Browse} color={color} size={size} />,
}}
/>
</Tabs>
);
}

View File

@ -19,7 +19,7 @@
*/
import { HomePage } from "@kyoo/ui";
import { withRoute } from "../utils";
import { withRoute } from "../../utils";
export default withRoute(HomePage, {
options: { headerTransparent: true, headerStyle: { backgroundColor: "transparent" } },

View File

@ -38,7 +38,6 @@ export default function SignGuard() {
if (error) return <Redirect href={"/connection-error"} />;
if (!account) return <Redirect href="/login" />;
return (
<Stack
screenOptions={{

View File

@ -19,13 +19,12 @@
*/
import React, { ComponentProps, ComponentType, ForwardedRef, forwardRef } from "react";
import { Platform, PressableProps, ViewStyle } from "react-native";
import { Platform, PressableProps } from "react-native";
import { SvgProps } from "react-native-svg";
import { YoshikiStyle } from "yoshiki";
import { px, Stylable, Theme, useYoshiki } from "yoshiki/native";
import { PressableFeedback } from "./links";
import { alpha } from "./themes";
import { Breakpoint, focusReset, ts, useBreakpointValue } from "./utils";
import { Breakpoint, focusReset, ts } from "./utils";
import { P } from "./text";
declare module "react" {