We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61bdc04 commit f437e26Copy full SHA for f437e26
1 file changed
src/hooks/useCreateProject.ts
@@ -156,8 +156,10 @@ export function useCreateProject({
156
157
for (let attempt = 0; attempt < maxAttempts; attempt++) {
158
try {
159
- const result = await actions.projects.get({ projectId });
160
- if (result.data?.project) {
+ const result = await actions.projects.list();
+ if (
161
+ result.data?.projects?.some((project) => project.id === projectId)
162
+ ) {
163
// Project exists! We can redirect now
164
return;
165
}
0 commit comments