(scope: string, email: string)
| 416 | } |
| 417 | |
| 418 | function 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 | |
| 431 | export function useRecentProjects() { |
| 432 | const currentUser = useOptionalCurrentUser(); |
no test coverage detected