mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-26 11:21:16 +01:00
Optimize sidebar collapsing
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user