diff --git a/app/navigators/AppNavigator.tsx b/app/navigators/AppNavigator.tsx index 9c275109..bf992665 100644 --- a/app/navigators/AppNavigator.tsx +++ b/app/navigators/AppNavigator.tsx @@ -1,9 +1,3 @@ -/** - * The app navigator (formerly "AppNavigator" and "MainNavigator") is used for the primary - * navigation flows of your app. - * Generally speaking, it will contain an auth flow (registration, login, forgot password) - * and a "main" flow which the user will use once logged in. - */ import { DarkTheme, DefaultTheme, NavigationContainer } from "@react-navigation/native" import { createNativeStackNavigator, NativeStackScreenProps } from "@react-navigation/native-stack" import { observer } from "mobx-react-lite" @@ -15,21 +9,7 @@ import { navigationRef, useBackButtonHandler } from "./navigationUtilities" import { TabNavigator } from "./TabNavigator" import { AuthNavigator } from "./AuthNavigator" import { useStores } from "app/models" -import { DemoNavigator } from "./DemoNavigator" -/** - * This type allows TypeScript to know what routes are defined in this navigator - * as well as what properties (if any) they might take when navigating to them. - * - * If no params are allowed, pass through `undefined`. Generally speaking, we - * recommend using your MobX-State-Tree store(s) to keep application state - * rather than passing state through navigation params. - * - * For more information, see this documentation: - * https://reactnavigation.org/docs/params/ - * https://reactnavigation.org/docs/typescript#type-checking-the-navigator - * https://reactnavigation.org/docs/typescript/#organizing-types - */ export type AppStackParamList = { Auth: undefined Home: undefined @@ -41,19 +21,12 @@ export type AppStackParamList = { Chat: undefined Listing: undefined ListingDetail: undefined - Feed: undefined Channels: undefined User: undefined Profile: undefined EditProfile: undefined - Nearby: undefined - Demos: undefined } -/** - * This is a list of all the route names that will exit the app if the back button - * is pressed while in that screen. Only affects Android. - */ const exitRoutes = Config.exitRoutes export type AppStackScreenProps = NativeStackScreenProps< @@ -61,7 +34,6 @@ export type AppStackScreenProps = NativeStack T > -// Documentation: https://reactnavigation.org/docs/stack-navigator/ const Stack = createNativeStackNavigator() const AppStack = observer(function AppStack() { @@ -77,12 +49,9 @@ const AppStack = observer(function AppStack() { - - - ) : ( diff --git a/app/navigators/DemoNavigator.tsx b/app/navigators/DemoNavigator.tsx deleted file mode 100644 index c78a09e7..00000000 --- a/app/navigators/DemoNavigator.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import { createNativeStackNavigator } from "@react-navigation/native-stack" -import { DemoScreens } from "app/screens" -import * as Screens from "app/screens/Demo" -import React from "react" - -export type DemoStackParamList = { - DemoScreens: undefined - BitcoinTrading: undefined - Ridesharing: undefined - FoodDelivery: undefined - Restaurants: undefined - EventTickets: undefined - EventTicketDetail: undefined - Rentals: undefined - RentalMap: undefined - GoodsMarketplace: undefined - PeerLending: undefined - Charity: undefined - CharityBrowse: undefined -} - -const Stack = createNativeStackNavigator() - -export const DemoNavigator = () => { - return ( - - - - - - - - - - - - - - - - ) -} diff --git a/app/navigators/TabNavigator.tsx b/app/navigators/TabNavigator.tsx index b5bc0ceb..2ec8af25 100644 --- a/app/navigators/TabNavigator.tsx +++ b/app/navigators/TabNavigator.tsx @@ -5,9 +5,7 @@ import { TextStyle, ViewStyle } from "react-native" import { useSafeAreaInsets } from "react-native-safe-area-context" import { Icon } from "../components" import { - BlankScreen, DiscoverScreen, - FeedScreen, HomeMessagesScreen, ProfileScreen, } from "../screens" @@ -20,7 +18,6 @@ export type DemoTabParamList = { Create: undefined Discover: undefined Profile: undefined - // DemoShowroom: { queryIndex?: string; itemIndex?: string } } /** @@ -63,33 +60,13 @@ export function TabNavigator() { ), }} /> - ( - - ), - }} - /> - ( - - ), - }} - /> ( - + ), }} /> diff --git a/app/screens/BlankScreen.tsx b/app/screens/BlankScreen.tsx deleted file mode 100644 index 8e33ceb0..00000000 --- a/app/screens/BlankScreen.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import { View } from "react-native" - -export const BlankScreen = () => { - return -} diff --git a/app/screens/ChannelsScreen.tsx b/app/screens/ChannelsScreen.tsx index 4340ab63..ccfa0fd6 100644 --- a/app/screens/ChannelsScreen.tsx +++ b/app/screens/ChannelsScreen.tsx @@ -6,11 +6,9 @@ import { AppStackScreenProps } from "app/navigators" import { Card, Header, Screen, Text, Button } from "app/components" import { useNavigation } from "@react-navigation/native" import { colors, spacing } from "app/theme" -import { SearchIcon, PlusCircleIcon } from "lucide-react-native" import { FlashList } from "@shopify/flash-list" import { RelayContext } from "app/components/RelayProvider" import { listChannels } from "arclib" -// import { useStores } from "app/models" interface ChannelsScreenProps extends NativeStackScreenProps> {} @@ -31,12 +29,6 @@ export const ChannelsScreen: FC = observer(function Channel leftIcon="back" leftIconColor={colors.palette.cyan400} onLeftPress={() => navigation.goBack()} - RightActionComponent={ - - - - - } /> ), }) @@ -90,12 +82,6 @@ const $root: ViewStyle = { flex: 1, } -const $headerRightActions: ViewStyle = { - flexDirection: "row", - gap: spacing.medium, - paddingRight: spacing.medium, -} - const $container: ViewStyle = { flex: 1, flexDirection: "column", diff --git a/app/screens/ChatScreen.tsx b/app/screens/ChatScreen.tsx index 5870ad6d..f411ed5e 100644 --- a/app/screens/ChatScreen.tsx +++ b/app/screens/ChatScreen.tsx @@ -5,7 +5,6 @@ import { NativeStackScreenProps } from "@react-navigation/native-stack" import { AppStackScreenProps } from "app/navigators" import { Header, Screen, Text, RelayContext, User, MessageForm, ListingItem } from "app/components" import { useNavigation } from "@react-navigation/native" -import { SearchIcon, UsersIcon } from "lucide-react-native" import { colors, spacing } from "app/theme" import { useStores } from "app/models" import { FlashList } from "@shopify/flash-list" @@ -44,12 +43,6 @@ export const ChatScreen: FC = observer(function ChatScreen({ leftIcon="back" leftIconColor={colors.palette.cyan400} onLeftPress={() => navigation.goBack()} - RightActionComponent={ - - - - - } /> ), }) @@ -125,12 +118,6 @@ const $container: ViewStyle = { paddingHorizontal: spacing.medium, } -const $headerRightActions: ViewStyle = { - flexDirection: "row", - gap: spacing.medium, - paddingRight: spacing.medium, -} - const $main: ViewStyle = { flex: 1, } diff --git a/app/screens/Demo/BitcoinTradingScreen.tsx b/app/screens/Demo/BitcoinTradingScreen.tsx deleted file mode 100644 index 8a6c087b..00000000 --- a/app/screens/Demo/BitcoinTradingScreen.tsx +++ /dev/null @@ -1,257 +0,0 @@ -import { useNavigation } from "@react-navigation/native" -import { colors, spacing } from "app/theme" -import React, { useEffect, useLayoutEffect, useState } from "react" -import { Screen, Header, Text, User, TextField, Button, Card } from "app/components" -import { observer } from "mobx-react-lite" -import { Pressable, TextStyle, View, ViewStyle } from "react-native" -import { FlashList } from "@shopify/flash-list" -import { ArrowRightIcon, SendIcon } from "lucide-react-native" -import { faker } from "@faker-js/faker" - -function createRandomMessage() { - return { - pubkey: "126103bfddc8df256b6e0abfd7f3797c80dcc4ea88f7c2f87dd4104220b4d65f", - content: faker.lorem.sentence(5), - metadata: { - action: faker.helpers.arrayElement(["Buy", "Sell"]), - price: faker.commerce.price(), - currency: faker.finance.currencyCode(), - amt: faker.datatype.number({ min: 0.1, max: 50 }), - expiration: "1 hour", - payment: faker.helpers.arrayElement(["Paypal", "Cash App", "Venmo"]), - reputation: faker.datatype.number({ min: 1, max: 100 }), - }, - } -} - -const createMessages = (num = 50) => { - return Array.from({ length: num }, createRandomMessage) -} - -export const BitcoinTradingScreen = observer(function BitcoinTradingScreen() { - const navigation = useNavigation() - - const [data, setData] = useState([]) - - useLayoutEffect(() => { - navigation.setOptions({ - headerShown: true, - header: () => ( -
navigation.goBack()} - /> - ), - }) - }, []) - - useEffect(() => { - const messages: any = createMessages(20) - setData(messages) - }, []) - - return ( - - - ( - navigation.navigate("EventTicketDetail", { name: item.event.name })} - style={$messageItem} - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - style={$card} - /> - - - )} - ListEmptyComponent={ - - - - } - estimatedItemSize={120} - inverted={true} - /> - - - ( -