mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-23 17:28:29 +02:00
A bunch of changes, including moving prompt/confirm out of context
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import type { CookieJar } from '@yaakapp-internal/models';
|
||||
import { trackEvent } from '../lib/analytics';
|
||||
import { showPrompt } from '../lib/prompt';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
import { getActiveWorkspaceId } from './useActiveWorkspace';
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
import { usePrompt } from './usePrompt';
|
||||
|
||||
export function useCreateCookieJar() {
|
||||
const prompt = usePrompt();
|
||||
|
||||
return useFastMutation<CookieJar | null>({
|
||||
mutationKey: ['create_cookie_jar'],
|
||||
mutationFn: async () => {
|
||||
@@ -15,7 +13,7 @@ export function useCreateCookieJar() {
|
||||
if (workspaceId == null) {
|
||||
throw new Error("Cannot create cookie jar when there's no active workspace");
|
||||
}
|
||||
const name = await prompt({
|
||||
const name = await showPrompt({
|
||||
id: 'new-cookie-jar',
|
||||
title: 'New CookieJar',
|
||||
placeholder: 'My Jar',
|
||||
|
||||
Reference in New Issue
Block a user