Skip to content

Commit

Permalink
make feed button white
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzius committed Sep 19, 2023
1 parent a1849bc commit 34a5f06
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 18 deletions.
2 changes: 1 addition & 1 deletion apps/expo/scripts/pre-install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

if [[ "$EAS_BUILD_RUNNER" == "eas-build" ]]; then
npm install -g [email protected].5
npm install -g [email protected].6
fi
12 changes: 2 additions & 10 deletions apps/expo/src/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
PenBox,
SearchIcon,
UserIcon,
View,
} from "lucide-react-native";

import { DrawerContent, DrawerProvider } from "~/components/drawer-content";
Expand Down Expand Up @@ -116,15 +115,8 @@ export default function AppLayout() {
name="null"
options={{
title: "Post",
tabBarIcon() {
return (
<View
className="h-8 w-10 flex-1 items-center justify-center rounded-lg"
style={{ backgroundColor: theme.colors.primary }}
>
<PenBox className="text-white" size={16} />
</View>
);
tabBarIcon({ color }) {
return <PenBox color={color} />;
},
}}
/>
Expand Down
41 changes: 35 additions & 6 deletions apps/expo/src/components/feeds-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ import { useCallback, useRef } from "react";
import { Dimensions, TouchableHighlight, View } from "react-native";
import Animated, { FadeInDown } from "react-native-reanimated";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { usePathname } from "expo-router";
import { Link, usePathname } from "expo-router";
import {
BottomSheetBackdrop,
BottomSheetModal,
BottomSheetSectionList,
} from "@gorhom/bottom-sheet";
import { useTheme } from "@react-navigation/native";
import { CircleDotIcon, CloudIcon, CloudyIcon } from "lucide-react-native";
import {
ChevronRightIcon,
CircleDotIcon,
CloudIcon,
CloudyIcon,
} from "lucide-react-native";

import {
LargeRow,
Expand All @@ -24,6 +29,7 @@ import { BackButtonOverride } from "./back-button-override";
import { FeedRow } from "./feed-row";
import { ItemSeparator } from "./item-separator";
import { QueryWithoutData } from "./query-without-data";
import { Text } from "./text";

export const FeedsButton = () => {
const theme = useTheme();
Expand All @@ -48,11 +54,15 @@ export const FeedsButton = () => {
}}
>
<Animated.View
className="absolute bottom-6 right-6 w-max max-w-max flex-1 flex-row items-center rounded-full p-4"
style={{ backgroundColor: theme.colors.primary }}
className="absolute bottom-6 right-6 flex-1 flex-row items-center rounded-full border p-4"
style={{
backgroundColor: theme.colors.card,
borderColor: theme.colors.border,
}}
entering={FadeInDown}
>
<CloudyIcon size={24} color="white" />
<CloudyIcon size={24} color={theme.colors.text} />
<Text className="ml-4 text-base">My Feeds</Text>
</Animated.View>
</TouchableHighlight>
<BottomSheetModal
Expand Down Expand Up @@ -165,7 +175,26 @@ const SheetContent = ({ dismiss }: { dismiss: () => void }) => {
ItemSeparatorComponent={() => (
<ItemSeparator iconWidth="w-6" containerClassName="pr-4" />
)}
ListFooterComponent={<View className="h-20" />}
ListFooterComponent={
<View className="p-6 pb-12">
<Link href="/feeds" asChild onPress={dismiss}>
<TouchableHighlight className="overflow-hidden rounded-lg">
<View
className="flex-row items-center justify-between p-4"
style={{ backgroundColor: theme.colors.primary }}
>
<View className="flex-row items-center">
<CloudyIcon size={24} className="text-white" />
<Text className="ml-4 text-base text-white">
Manage my feeds
</Text>
</View>
<ChevronRightIcon size={20} className="text-neutral-50" />
</View>
</TouchableHighlight>
</Link>
</View>
}
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"overrides": {
"@tanstack/react-query": "^4.35.3"
},
"packageManager": "[email protected].5",
"packageManager": "[email protected].6",
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
Expand Down

1 comment on commit 34a5f06

@vercel
Copy link

@vercel vercel bot commented on 34a5f06 Sep 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.