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 13, 2023
1 parent 228e2a1 commit dfb2cee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/screens/WelcomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -35,6 +36,10 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = (_props) => {
requestUserPermission()
}, [])

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

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

0 comments on commit dfb2cee

Please sign in to comment.