Skip to content
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
3 changes: 2 additions & 1 deletion components/drawer-layout/DrawerMenuContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Colors from "@/constants/Colors";
import { useAuthContext } from "@/contexts";
import { useBrandContext } from "@/contexts/brand-context.provider";
import { useBreakpoints } from "@/hooks";
import { OpenDrawerSubject } from "@/shared-uis/components/CustomDrawer";
import ImageComponent from "@/shared-uis/components/image-component";
import { Brand } from "@/types/Brand";
import {
Expand All @@ -29,7 +30,7 @@ const DrawerMenuContent: React.FC<DrawerMenuContentProps> = () => {
const filteredBrands = brands

const handleBrandChange = (brand: Brand) => {
navigation.dispatch(DrawerActions.closeDrawer());
OpenDrawerSubject.next(false)
setSelectedBrand(brand);
};

Expand Down
31 changes: 12 additions & 19 deletions components/explore-influencers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import { View } from "../theme/Themed";


import ProfileBottomSheet from "@/shared-uis/components/ProfileModal/Profile-Modal";
import {
BottomSheetBackdrop
} from "@gorhom/bottom-sheet";

import { MAX_WIDTH_WEB } from "@/constants/Container";
import { useAuthContext } from "@/contexts";
Expand Down Expand Up @@ -152,15 +149,9 @@ const ExploreInfluencers = () => {
manager
]);

const renderBackdrop = (props: any) => {
return (
<BottomSheetBackdrop
{...props}
disappearsOnIndex={-1}
appearsOnIndex={0}
/>
);
};
const width = Math.min(MAX_WIDTH_WEB, Dimensions.get('window').width);
const [height, setHeight] = useState(Math.min(APPROX_CARD_HEIGHT, Dimensions.get('window').height))


if (isLoading && influencers.length == 0) {
return (
Expand All @@ -177,20 +168,22 @@ const ExploreInfluencers = () => {
</AppLayout>
);
}

const width = Math.min(MAX_WIDTH_WEB, Dimensions.get('window').width);
const height = Math.min(APPROX_CARD_HEIGHT, Dimensions.get('window').height);

return (
<AppLayout>
<View
style={{
flex: 1,
marginHorizontal: "auto",
width: "100%", //xl ? MAX_WIDTH_WEB :
width: "100%",
height: "100%",
alignSelf: "stretch",
minHeight: 0,
}}
// onLayout={(event) => {
// const next = Math.round(event.nativeEvent.layout.height);
// setHeight((prev) => (prev === next ? prev : next));
// }}
>
<View style={{ alignSelf: "stretch" }}>
<View style={{ alignSelf: "stretch", flex: 1, minHeight: 0 }}>
<CarouselInViewProvider>
<CarouselScroller
data={filteredInfluencers}
Expand Down
5 changes: 1 addition & 4 deletions components/ui/drawer-toggle-button/DrawerToggleButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useTheme } from '@react-navigation/native';
import { useNavigation } from "expo-router";
import { Pressable } from 'react-native';

import { View } from '@/components/theme/Themed';
Expand All @@ -16,13 +15,11 @@ const DrawerToggleButton: React.FC<DrawerToggleButtonProps> = ({
icon,
...props
}) => {
const navigation = useNavigation();
const theme = useTheme();

return (
<Pressable
{...props}
onPress={() => OpenDrawerSubject.next(undefined)}
onPress={() => OpenDrawerSubject.next(true)}
>
<View
style={{
Expand Down
2 changes: 1 addition & 1 deletion shared-uis