From dfb2ceea0696145119510dc9b4644710eb68c0d2 Mon Sep 17 00:00:00 2001 From: Joshua Yoes Date: Tue, 11 Apr 2023 20:35:26 -0700 Subject: [PATCH] Add prefetchScheduledEvents to WelcomeScreen --- app/screens/WelcomeScreen.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/screens/WelcomeScreen.tsx b/app/screens/WelcomeScreen.tsx index a7ee0415..7dee0d3f 100644 --- a/app/screens/WelcomeScreen.tsx +++ b/app/screens/WelcomeScreen.tsx @@ -7,6 +7,7 @@ import { useAppNavigation } from "../hooks" import { AppStackScreenProps } from "../navigators" import { colors, spacing } from "../theme" import messaging from "@react-native-firebase/messaging" +import { prefetchScheduledEvents } from "../services/api" const welcomeLogo = require("../../assets/images/welcome-shapes.png") const { width: screenWidth } = Dimensions.get("screen") @@ -35,6 +36,10 @@ export const WelcomeScreen: React.FC = (_props) => { requestUserPermission() }, []) + useLayoutEffect(() => { + prefetchScheduledEvents() + }, []) + return (