diff --git a/apps/mobile/app/screens/wrapped/index.tsx b/apps/mobile/app/screens/wrapped/index.tsx index f41988b70..7146a6837 100644 --- a/apps/mobile/app/screens/wrapped/index.tsx +++ b/apps/mobile/app/screens/wrapped/index.tsx @@ -930,10 +930,7 @@ export const Wrapped = ({ navigation, route }: NavigationProps<"Wrapped">) => { const { width } = useWindowDimensions(); const [loading, setLoading] = useState(true); const [wrapped, setWrapped] = useState(null); - const wrappedRef = useStoredRef( - "wrapped-" + dayjs().year(), - null - ); + const wrappedRef = useRef(null); const [showPresentation, setShowPresentation] = useState(false); const [messageIndex, setMessageIndex] = useState(0); const insets = useGlobalSafeAreaInsets(); @@ -958,18 +955,11 @@ export const Wrapped = ({ navigation, route }: NavigationProps<"Wrapped">) => { async function loadWrapped() { setLoading(true); try { - if (!wrappedRef.current) { - wrappedRef.current = await db.wrapped.get(); - console.log("CACHE NOT FOUND"); - } - setWrapped(wrappedRef.current); - console.log("WRAP LOADED"); + const wrapped = await db.wrapped.get(); + setWrapped(wrapped); setShowPresentation(true); setSlides(() => { const slides: React.ReactNode[] = []; - if (!wrappedRef.current) return []; - const wrapped = wrappedRef.current as WrappedStats; - slides.push(); slides.push(