Leon4gr45/builder
0
1// Decide whether a fresh visitor should be dropped into an auto-created first project.2// False when any URL param indicates an existing destination (a specific project, an OAuth3// return, a doc, or settings), or when the user already has projects.4export function shouldAutoCreateFirstProject(opts: { search: string; projectCount: number }): boolean {5 if (opts.projectCount > 0) return false;6 const params = new URLSearchParams(opts.search);7 for (const key of ['project', 'code', 'error', 'doc', 'settings']) {8 if (params.has(key)) return false;9 }10 return true;11}12 