Skip to content

Commit f437e26

Browse files
committed
fix(projects): poll project list instead of missing projects.get action
1 parent 61bdc04 commit f437e26

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/hooks/useCreateProject.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,10 @@ export function useCreateProject({
156156

157157
for (let attempt = 0; attempt < maxAttempts; attempt++) {
158158
try {
159-
const result = await actions.projects.get({ projectId });
160-
if (result.data?.project) {
159+
const result = await actions.projects.list();
160+
if (
161+
result.data?.projects?.some((project) => project.id === projectId)
162+
) {
161163
// Project exists! We can redirect now
162164
return;
163165
}

0 commit comments

Comments
 (0)