@@ -28,7 +28,6 @@ import { useRedirect } from '@/lib/access/common';
2828import { useLocalStorage , useToggle } from '@/lib/hooks' ;
2929import { useCurrentOperationWithFetchingState } from '@/lib/hooks/laboratory/use-current-operation' ;
3030import { TargetLaboratoryPageQuery } from '@/lib/hooks/laboratory/use-operation-collections-plugin' ;
31- import { useSyncOperationState } from '@/lib/hooks/laboratory/use-sync-operation-state' ;
3231import { useOperationFromQueryString } from '@/lib/hooks/laboratory/useOperationFromQueryString' ;
3332import { useResetState } from '@/lib/hooks/use-reset-state' ;
3433import { cn } from '@/lib/utils' ;
@@ -403,7 +402,7 @@ function useLaboratoryState(props: {
403402
404403 const deleteOperation = useMemo (
405404 ( ) =>
406- throttle ( ( collection : LaboratoryCollection , operation : LaboratoryCollectionOperation ) => {
405+ throttle ( ( _collection : LaboratoryCollection , operation : LaboratoryCollectionOperation ) => {
407406 void mutateDelete ( {
408407 selector : {
409408 targetSlug : props . targetSlug ,
@@ -478,32 +477,26 @@ function useLaboratoryState(props: {
478477 targetSlug : props . targetSlug ,
479478 } ) ;
480479
481- const { savedOperation } = useSyncOperationState ( {
482- organizationSlug : props . organizationSlug ,
483- projectSlug : props . projectSlug ,
484- targetSlug : props . targetSlug ,
485- } ) ;
486-
487480 const defaultOperations = useMemo ( ( ) => {
488- if ( currentOperation && savedOperation ) {
481+ if ( currentOperation ) {
489482 return [
490483 ...getLocalStorageState ( 'operations' , [ ] ) ,
491484 {
492485 id : currentOperation . id ,
493486 name : currentOperation . name ,
494- query : savedOperation . query ,
495- variables : savedOperation . variables ?? '{}' ,
487+ query : currentOperation . query ,
488+ variables : currentOperation . variables ?? '{}' ,
496489 headers : currentOperation . headers ?? '{}' ,
497490 extensions : '{}' ,
498491 } satisfies LaboratoryOperation ,
499492 ] ;
500493 }
501494
502495 return getLocalStorageState ( 'operations' , [ ] ) ;
503- } , [ currentOperation , savedOperation ] ) ;
496+ } , [ currentOperation ] ) ;
504497
505498 const defaultTabs = useMemo ( ( ) => {
506- if ( currentOperation && savedOperation ) {
499+ if ( currentOperation ) {
507500 return [
508501 ...getLocalStorageState ( 'tabs' , [ ] ) ,
509502 {
@@ -522,7 +515,7 @@ function useLaboratoryState(props: {
522515 }
523516
524517 return getLocalStorageState ( 'tabs' , [ ] ) ;
525- } , [ currentOperation , savedOperation ] ) ;
518+ } , [ currentOperation ] ) ;
526519
527520 const operationIdFromSearch = useOperationFromQueryString ( ) ;
528521
0 commit comments