MCPcopy Create free account
hub / github.com/Microck/opencode-studio / useIsFirstLoad

Function useIsFirstLoad

client-next/src/components/app-shell.tsx:42–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40}
41
42function 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
57function useLaunchAttempt() {
58 const [hasAttempted, setHasAttempted] = useState(false);

Callers 1

AppShellFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected