mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-17 23:13:51 +01:00
Remove useToast everywhere
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
import {generateId} from "../lib/generateId";
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
import type { HttpUrlParameter } from '@yaakapp-internal/models';
|
||||
import { useToast } from './useToast';
|
||||
import { generateId } from '../lib/generateId';
|
||||
import { pluralize } from '../lib/pluralize';
|
||||
import { getHttpRequest } from '../lib/store';
|
||||
import { useFastMutation } from './useFastMutation';
|
||||
import { useRequestEditor } from './useRequestEditor';
|
||||
import { showToast } from '../lib/toast';
|
||||
import { useUpdateAnyHttpRequest } from './useUpdateAnyHttpRequest';
|
||||
|
||||
export function useImportQuerystring(requestId: string) {
|
||||
const updateRequest = useUpdateAnyHttpRequest();
|
||||
const toast = useToast();
|
||||
const [, { focusParamsTab, forceParamsRefresh, forceUrlRefresh }] = useRequestEditor();
|
||||
|
||||
return useFastMutation({
|
||||
@@ -40,7 +39,7 @@ export function useImportQuerystring(requestId: string) {
|
||||
});
|
||||
|
||||
if (urlParameters.length > 0) {
|
||||
toast.show({
|
||||
showToast({
|
||||
id: 'querystring-imported',
|
||||
color: 'info',
|
||||
message: `Extracted ${urlParameters.length} ${pluralize('parameter', urlParameters.length)} from URL`,
|
||||
|
||||
Reference in New Issue
Block a user