Optimize sidebar collapsing

This commit is contained in:
Gregory Schier
2024-12-23 05:05:04 -08:00
parent 61d094d9fd
commit 31f2bff0f6
35 changed files with 402 additions and 238 deletions

View File

@@ -15,9 +15,14 @@ export function useCreateEnvironment() {
const workspace = useActiveWorkspace();
const setEnvironments = useSetAtom(environmentsAtom);
return useFastMutation<Environment | null, unknown, Environment>({
return useFastMutation<Environment | null, unknown, Environment | null>({
toastyError: true,
mutationKey: ['create_environment'],
mutationFn: async (baseEnvironment) => {
if (baseEnvironment == null) {
throw new Error('No base environment passed');
}
const name = await prompt({
id: 'new-environment',
title: 'New Environment',