MCPcopy Create free account
hub / github.com/bytebase/bytebase / readRecentProjectNames

Function readRecentProjectNames

frontend/src/react/hooks/useAppState.ts:418–429  ·  view source on GitHub ↗
(scope: string, email: string)

Source from the content-addressed store, hash-verified

416}
417
418function readRecentProjectNames(scope: string, email: string) {
419 if (!email) return [];
420 try {
421 const raw = localStorage.getItem(storageKeyRecentProjects(scope, email));
422 const parsed = raw ? JSON.parse(raw) : [];
423 return Array.isArray(parsed)
424 ? parsed.filter((name): name is string => typeof name === "string")
425 : [];
426 } catch {
427 return [];
428 }
429}
430
431export function useRecentProjects() {
432 const currentUser = useOptionalCurrentUser();

Callers 1

useRecentProjectsFunction · 0.85

Calls 1

storageKeyRecentProjectsFunction · 0.90

Tested by

no test coverage detected