()
| 40 | } |
| 41 | |
| 42 | function useIsFirstLoad() { |
| 43 | const [isFirst, setIsFirst] = useState(true); |
| 44 | |
| 45 | useEffect(() => { |
| 46 | const hasLoaded = sessionStorage.getItem(FIRST_LOAD_KEY); |
| 47 | if (hasLoaded) { |
| 48 | setIsFirst(false); |
| 49 | } else { |
| 50 | sessionStorage.setItem(FIRST_LOAD_KEY, "1"); |
| 51 | } |
| 52 | }, []); |
| 53 | |
| 54 | return isFirst; |
| 55 | } |
| 56 | |
| 57 | function useLaunchAttempt() { |
| 58 | const [hasAttempted, setHasAttempted] = useState(false); |