prevent multiple runs of useStarterPackEntry

This commit is contained in:
Hailey
2024-06-17 15:17:18 -07:00
parent f980847238
commit 95011724de
@@ -11,9 +11,12 @@ export function useStarterPackEntry() {
const [ready, setReady] = React.useState(false) const [ready, setReady] = React.useState(false)
const setCurrentStarterPack = useSetCurrentStarterPack() const setCurrentStarterPack = useSetCurrentStarterPack()
const usedStarterPacks = useUsedStarterPacks() const usedStarterPacks = useUsedStarterPacks()
const hasRan = React.useRef(false)
React.useEffect(() => { React.useEffect(() => {
if (ready) return if (ready || hasRan.current) return
hasRan.current = true
;(async () => { ;(async () => {
let uri: string | null | undefined let uri: string | null | undefined