Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all placeholders #131

Merged
merged 4 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions app/navigators/AppNavigator.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand All @@ -41,27 +21,19 @@ 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<T extends keyof AppStackParamList> = NativeStackScreenProps<
AppStackParamList,
T
>

// Documentation: https://reactnavigation.org/docs/stack-navigator/
const Stack = createNativeStackNavigator<AppStackParamList>()

const AppStack = observer(function AppStack() {
Expand All @@ -77,12 +49,9 @@ const AppStack = observer(function AppStack() {
<Stack.Screen name="Chat" component={Screens.ChatScreen} />
<Stack.Screen name="Listing" component={Screens.ListingScreen} />
<Stack.Screen name="ListingDetail" component={Screens.ListingDetailScreen} />
<Stack.Screen name="Nearby" component={Screens.NearbyScreen} />
<Stack.Screen name="Feed" component={Screens.FeedScreen} />
<Stack.Screen name="Channels" component={Screens.ChannelsScreen} />
<Stack.Screen name="User" component={Screens.UserScreen} />
<Stack.Screen name="EditProfile" component={Screens.EditProfileScreen} />
<Stack.Screen name="Demos" component={DemoNavigator} />
</>
) : (
<Stack.Screen name="Auth" component={AuthNavigator} />
Expand Down
42 changes: 0 additions & 42 deletions app/navigators/DemoNavigator.tsx

This file was deleted.

25 changes: 1 addition & 24 deletions app/navigators/TabNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -20,7 +18,6 @@ export type DemoTabParamList = {
Create: undefined
Discover: undefined
Profile: undefined
// DemoShowroom: { queryIndex?: string; itemIndex?: string }
}

/**
Expand Down Expand Up @@ -63,33 +60,13 @@ export function TabNavigator() {
),
}}
/>
<Tab.Screen
name="Feed"
component={FeedScreen}
options={{
tabBarLabel: "Feed",
tabBarIcon: ({ focused }) => (
<Icon icon="Rss" color={focused ? colors.tint : inactiveIconColor} size={24} />
),
}}
/>
<Tab.Screen
name="Create"
component={BlankScreen}
options={{
tabBarLabel: "Create",
tabBarIcon: ({ focused }) => (
<Icon icon="PlusCircle" color={focused ? colors.tint : inactiveIconColor} size={24} />
),
}}
/>
<Tab.Screen
name="Discover"
component={DiscoverScreen}
options={{
tabBarLabel: "Discover",
tabBarIcon: ({ focused }) => (
<Icon icon="Search" color={focused ? colors.tint : inactiveIconColor} size={24} />
<Icon icon="Globe" color={focused ? colors.tint : inactiveIconColor} size={24} />
),
}}
/>
Expand Down
5 changes: 0 additions & 5 deletions app/screens/BlankScreen.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions app/screens/ChannelsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<AppStackScreenProps<"Channels">> {}

Expand All @@ -31,12 +29,6 @@ export const ChannelsScreen: FC<ChannelsScreenProps> = observer(function Channel
leftIcon="back"
leftIconColor={colors.palette.cyan400}
onLeftPress={() => navigation.goBack()}
RightActionComponent={
<View style={$headerRightActions}>
<SearchIcon size={20} color={colors.palette.cyan400} />
<PlusCircleIcon size={20} color={colors.palette.cyan400} />
</View>
}
/>
),
})
Expand Down Expand Up @@ -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",
Expand Down
13 changes: 0 additions & 13 deletions app/screens/ChatScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -44,12 +43,6 @@ export const ChatScreen: FC<ChatScreenProps> = observer(function ChatScreen({
leftIcon="back"
leftIconColor={colors.palette.cyan400}
onLeftPress={() => navigation.goBack()}
RightActionComponent={
<View style={$headerRightActions}>
<UsersIcon size={20} color={colors.palette.cyan400} />
<SearchIcon size={20} color={colors.palette.cyan400} />
</View>
}
/>
),
})
Expand Down Expand Up @@ -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,
}
Expand Down
Loading