From ae880c1ab31c8590a04104a871b8e19da29e9359 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sun, 17 Nov 2024 20:09:54 -0500 Subject: [PATCH 1/3] Testing for creating drawers --- client/app.json | 5 +- client/app/components/chat/NearbyHeader.tsx | 10 ++-- .../app/components/chat/NearbyUserDrawer.tsx | 36 +++++++++++++ client/app/index.js | 4 +- client/app/screens/chat/ChatScreen.tsx | 2 + client/gesture-handler.js | 2 + client/gesture-handler.native.js | 2 + client/package-lock.json | 50 +++++++++++++++++++ client/package.json | 1 + 9 files changed, 102 insertions(+), 10 deletions(-) create mode 100644 client/app/components/chat/NearbyUserDrawer.tsx create mode 100644 client/gesture-handler.js create mode 100644 client/gesture-handler.native.js diff --git a/client/app.json b/client/app.json index 69e66da8b..cc2c81b15 100644 --- a/client/app.json +++ b/client/app.json @@ -12,9 +12,7 @@ "resizeMode": "contain", "backgroundColor": "34D1BF" }, - "assetBundlePatterns": [ - "**/*" - ], + "assetBundlePatterns": ["**/*"], "ios": { "supportsTablet": true }, @@ -27,6 +25,7 @@ "web": { "favicon": "./assets/favicon.png" }, + "newArchEnabled": true, "plugins": [ "expo-router", [ diff --git a/client/app/components/chat/NearbyHeader.tsx b/client/app/components/chat/NearbyHeader.tsx index f9b61f9a2..f86d32ad3 100644 --- a/client/app/components/chat/NearbyHeader.tsx +++ b/client/app/components/chat/NearbyHeader.tsx @@ -14,10 +14,12 @@ export const NearbyHeader: React.FC = () => { Nearby - + {}}> + + {5} diff --git a/client/app/components/chat/NearbyUserDrawer.tsx b/client/app/components/chat/NearbyUserDrawer.tsx new file mode 100644 index 000000000..3f520573f --- /dev/null +++ b/client/app/components/chat/NearbyUserDrawer.tsx @@ -0,0 +1,36 @@ +import * as React from "react"; +import { Dimensions, Text, StyleSheet, View } from "react-native"; +import { Drawer } from "react-native-drawer-layout"; +import { Button } from "react-native"; + +export const NearbyUserDrawer = () => { + const [open, setOpen] = React.useState(true); + + return ( + setOpen(true)} + onClose={() => setOpen(false)} + drawerType={"front"} + renderDrawerContent={() => { + return ( + + Drawer content + + ); + }}> +