diff --git a/src/App.tsx b/src/App.tsx index c83eb61..059ec64 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,7 +6,6 @@ import { PlatformBackgroundSyncManager } from "./components/Managers/BackgroundS import { PlatformNotificationReceivedManager } from "./components/Managers/NotificationReceivedManager"; import { PlatformNotificationRespondedManager } from "./components/Managers/NotificationRespondedManager"; import { PlatformTokenManager } from "./components/Managers/TokenManager"; -import { EventsSearchProvider } from "./components/Searching/EventsSearchContext"; import { SynchronizationProvider } from "./components/Synchronization/SynchronizationProvider"; import { NavigationProvider } from "./context/NavigationProvider"; @@ -17,24 +16,22 @@ export default function App() { return ( - - - + + - {/* Handle device token acquisition. */} - + {/* Handle device token acquisition. */} + - {/* Handle handling notifications in foreground. */} - - + {/* Handle handling notifications in foreground. */} + + - {/* Handle notifications in background. */} - + {/* Handle notifications in background. */} + - {/* Set up analytics. */} - - - + {/* Set up analytics. */} + + ); diff --git a/src/app/Events/EventActionsSheet.tsx b/src/app/Events/EventActionsSheet.tsx index 39e6042..1974b1f 100644 --- a/src/app/Events/EventActionsSheet.tsx +++ b/src/app/Events/EventActionsSheet.tsx @@ -1,39 +1,54 @@ import BottomSheet, { BottomSheetScrollView } from "@gorhom/bottom-sheet"; -import { FC, useEffect, useRef } from "react"; +import { debounce } from "lodash"; +import { FC, useEffect, useMemo, useRef } from "react"; import { StyleSheet } from "react-native"; +import { useThemeBackground } from "../../context/Theme"; import { EventDetails } from "../../store/eurofurence.types"; import { EventContent } from "./EventContent"; type EventActionsSheetProps = { - eventRecord: EventDetails | undefined; + event: EventDetails | null; onClose?: () => void; }; -export const EventActionsSheet: FC = ({ eventRecord, onClose }) => { +export const EventActionsSheet: FC = ({ event, onClose }) => { const sheetRef = useRef(null); + const styleBackground = useThemeBackground("background"); + const styleHandle = useThemeBackground("inverted"); + + const close = useMemo(() => (onClose ? debounce(onClose, 100) : undefined), [onClose]); useEffect(() => { - if (eventRecord) { + if (event) { sheetRef.current?.snapToIndex(0); } else { sheetRef.current?.close(); } - }, [eventRecord]); - - if (eventRecord === undefined) { - return null; - } + }, [sheetRef, event]); return ( - - {eventRecord && } + + {!event ? null : } ); }; const styles = StyleSheet.create({ - container: { + handle: { + borderTopLeftRadius: 15, + borderTopRightRadius: 15, + }, + content: { paddingHorizontal: 30, paddingBottom: 100, }, diff --git a/src/app/Events/EventCard.tsx b/src/app/Events/EventCard.tsx index b15c819..6993b75 100644 --- a/src/app/Events/EventCard.tsx +++ b/src/app/Events/EventCard.tsx @@ -39,19 +39,19 @@ export const EventCard: FC = ({ type = "duration", event, onPres // Return simple label with duration text. return ( -