diff --git a/app/navigators/AppNavigator.tsx b/app/navigators/AppNavigator.tsx index 365aee4d..bdb8c425 100644 --- a/app/navigators/AppNavigator.tsx +++ b/app/navigators/AppNavigator.tsx @@ -30,6 +30,7 @@ import { TabNavigator } from "./TabNavigator" export type AppStackParamList = { Home: undefined Tabs: undefined + HomeMessages: undefined } /** diff --git a/app/navigators/TabNavigator.tsx b/app/navigators/TabNavigator.tsx index 89c529f6..ff961105 100644 --- a/app/navigators/TabNavigator.tsx +++ b/app/navigators/TabNavigator.tsx @@ -4,7 +4,7 @@ import React from "react" import { TextStyle, ViewStyle } from "react-native" import { useSafeAreaInsets } from "react-native-safe-area-context" import { Icon } from "../components" -import { BlankScreen } from "../screens" +import { HomeMessagesScreen, BlankScreen } from "../screens" import { colors, spacing, typography } from "../theme" import { AppStackParamList, AppStackScreenProps } from "./AppNavigator" @@ -29,7 +29,7 @@ export type DemoTabScreenProps = CompositeScre const Tab = createBottomTabNavigator() -const inactiveIconColor = colors.textDim +const inactiveIconColor = colors.palette.cyan950 export function TabNavigator() { const { bottom } = useSafeAreaInsets() @@ -44,15 +44,16 @@ export function TabNavigator() { tabBarInactiveTintColor: colors.text, tabBarLabelStyle: $tabBarLabel, tabBarItemStyle: $tabBarItem, + tabBarShowLabel: false, }} > ( - + ), }} /> @@ -62,7 +63,7 @@ export function TabNavigator() { options={{ tabBarLabel: "Feed", tabBarIcon: ({ focused }) => ( - + ), }} /> @@ -73,7 +74,7 @@ export function TabNavigator() { options={{ tabBarLabel: "Create", tabBarIcon: ({ focused }) => ( - + ), }} /> @@ -83,7 +84,7 @@ export function TabNavigator() { options={{ tabBarLabel: "Discover", tabBarIcon: ({ focused }) => ( - + ), }} /> diff --git a/app/screens/HomeMessagesScreen.tsx b/app/screens/HomeMessagesScreen.tsx new file mode 100644 index 00000000..7800d1ae --- /dev/null +++ b/app/screens/HomeMessagesScreen.tsx @@ -0,0 +1,295 @@ +import React, { FC, useState } from "react" +import { observer } from "mobx-react-lite" +import { View, ViewStyle, ImageStyle, TextStyle } from "react-native" +import { NativeStackScreenProps } from "@react-navigation/native-stack" +import { AppStackScreenProps } from "app/navigators" +import { AutoImage, Button, Screen, Text, TextField } from "app/components" +import { spacing, colors } from "app/theme" +import { ChevronDownIcon, PlusIcon, SearchIcon } from "lucide-react-native" +import { FlashList } from "@shopify/flash-list" +// import { useNavigation } from "@react-navigation/native" +// import { useStores } from "app/models" + +interface HomeMessagesScreenProps + extends NativeStackScreenProps> {} + +// #TODO: Replace with real data +const DumpChannels = [ + "https://ui-avatars.com/api/?name=a1&background=random&size=200", + "https://ui-avatars.com/api/?name=a2&background=random&size=200", + "https://ui-avatars.com/api/?name=a3&background=random&size=200", + "https://ui-avatars.com/api/?name=a4&background=random&size=200", + "https://ui-avatars.com/api/?name=a5&background=random&size=200", +] + +const DumpMessages = [ + { + picture: "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp", + name: "Satoshi Nakamoto", + content: "#bitcoin", + }, + { + picture: "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp", + name: "Design Review Chat", + content: "Document", + }, + { + picture: "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp", + name: "R4IN80W", + content: "That is how you do it!", + }, + { + picture: "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp", + name: "480 Design", + content: "Check out this new claymorphism design!", + }, + { + picture: "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp", + name: "help! I'm in the hole", + content: "🎉", + }, + { + picture: "https://void.cat/d/KmypFh2fBdYCEvyJrPiN89.webp", + name: "Pleb", + content: "You: GM!", + }, +] + +export const HomeMessagesScreen: FC = observer( + function HomeMessagesScreen() { + const [toggleSearch, setToggleSearch] = useState(false) + + // Pull in one of our MST stores + // const { someStore, anotherStore } = useStores() + + // Pull in navigation via hook + // const navigation = useNavigation() + + return ( + + + + + + + + + + + + ( + + + + )} + ListFooterComponent={() => ( + +