From 267f72f84c6a5979eae696dae8fddee25188c1bb Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Fri, 15 Mar 2024 21:06:13 +0000 Subject: ui(mobile): New header style in the app --- apps/mobile/app/dashboard/(tabs)/index.tsx | 90 +++++++++++++++--------------- 1 file changed, 46 insertions(+), 44 deletions(-) (limited to 'apps/mobile/app/dashboard/(tabs)/index.tsx') diff --git a/apps/mobile/app/dashboard/(tabs)/index.tsx b/apps/mobile/app/dashboard/(tabs)/index.tsx index 1736def9..1a17d472 100644 --- a/apps/mobile/app/dashboard/(tabs)/index.tsx +++ b/apps/mobile/app/dashboard/(tabs)/index.tsx @@ -1,60 +1,62 @@ -import { Platform, View } from "react-native"; +import { Platform, SafeAreaView, View } from "react-native"; import * as Haptics from "expo-haptics"; -import { Stack, useRouter } from "expo-router"; +import { useRouter } from "expo-router"; import BookmarkList from "@/components/bookmarks/BookmarkList"; import { MenuView } from "@react-native-menu/menu"; import { SquarePen } from "lucide-react-native"; +import PageTitle from "@/components/ui/PageTitle"; function HeaderRight() { const router = useRouter(); return ( - { - Haptics.selectionAsync(); - if (nativeEvent.event === "note") { - router.navigate("dashboard/add-note"); - } else if (nativeEvent.event === "link") { - router.navigate("dashboard/add-link"); - } - }} - actions={[ - { - id: "link", - title: "New Link", - image: Platform.select({ - ios: "link", - android: "ic_menu_link", - }), - }, - { - id: "note", - title: "New Note", - image: Platform.select({ - ios: "note", - android: "ic_menu_note", - }), - }, - ]} - shouldOpenOnLongPress={false} - > - - Haptics.selectionAsync()} - /> - - + { + Haptics.selectionAsync(); + if (nativeEvent.event === "note") { + router.navigate("dashboard/add-note"); + } else if (nativeEvent.event === "link") { + router.navigate("dashboard/add-link"); + } + }} + actions={[ + { + id: "link", + title: "New Link", + image: Platform.select({ + ios: "link", + android: "ic_menu_link", + }), + }, + { + id: "note", + title: "New Note", + image: Platform.select({ + ios: "note", + android: "ic_menu_note", + }), + }, + ]} + shouldOpenOnLongPress={false} + > + + Haptics.selectionAsync()} /> + + ); } export default function Home() { return ( - <> - , - }} + + + + + + } /> - - + ); } -- cgit v1.2.3-70-g09d2