Skip to content

Commit

Permalink
Add prefetchScheduledEvents to WelcomeScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuayoes committed Apr 20, 2023
1 parent 76567d0 commit 28c6bea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/screens/WelcomeScreen.tsx
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -18,6 +19,10 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = (_props) => {
navigation.navigate("Tabs", { screen: "Schedule" })
}

useLayoutEffect(() => {
prefetchScheduledEvents()
}, [])

return (
<Screen style={$container}>
<View style={$topContainer}>
Expand Down

0 comments on commit 28c6bea

Please sign in to comment.