diff --git a/app/screens/WelcomeScreen.tsx b/app/screens/WelcomeScreen.tsx index b1290263..d8f02137 100644 --- a/app/screens/WelcomeScreen.tsx +++ b/app/screens/WelcomeScreen.tsx @@ -1,10 +1,11 @@ -import React from "react" +import React, { useLayoutEffect } from "react" import { Dimensions, Image, ImageStyle, Platform, TextStyle, View, ViewStyle } from "react-native" import { SafeAreaView } from "react-native-safe-area-context" import { Button, Screen, Text } from "../components" import { useAppNavigation } from "../hooks" import { AppStackScreenProps } from "../navigators" import { colors, spacing } from "../theme" +import { prefetchScheduledEvents } from "../services/api" const welcomeLogo = require("../../assets/images/welcome-shapes.png") const { width: screenWidth } = Dimensions.get("screen") @@ -18,6 +19,10 @@ export const WelcomeScreen: React.FC = (_props) => { navigation.navigate("Tabs", { screen: "Schedule" }) } + useLayoutEffect(() => { + prefetchScheduledEvents() + }, []) + return (