refactor: update DuplicateProject and AdvancedEnvironmentSelector components to utilize environmentId for improved context handling; enhance UI with project and environment selection features for better user experience

This commit is contained in:
Mauricio Siu
2025-09-01 22:40:51 -06:00
parent 766890192d
commit 883c3f9739
5 changed files with 156 additions and 39 deletions

View File

@@ -36,14 +36,13 @@ export const createProject = async (
}
// Automatically create a production environment
try {
await createProductionEnvironment(newProject.projectId);
} catch (error) {
console.error("Error creating production environment:", error);
// Don't fail project creation if environment creation fails
}
const newEnvironment = await createProductionEnvironment(newProject.projectId);
return {
project: newProject,
environment: newEnvironment,
};
return newProject;
};
export const findProjectById = async (projectId: string) => {