11'use client' ;
22
3- import { useEffect } from 'react' ;
4- import { useRouter } from 'next/navigation' ;
53import { graphql } from '@/gql' ;
64import { useMutation , useQuery } from '@tanstack/react-query' ;
7- import { parseAsString , useQueryState } from 'next-usequerystate ' ;
5+ import { useRouter } from 'next/navigation ' ;
86import { Button , DataTable , Icon , IconButton , Text , toast } from 'opub-ui' ;
7+ import { useEffect , useState } from 'react' ;
98import { twMerge } from 'tailwind-merge' ;
109
11- import { GraphQL } from '@/lib/api' ;
12- import { Icons } from '@/components/icons' ;
1310import { LinkButton } from '@/components/Link' ;
11+ import { Icons } from '@/components/icons' ;
1412import { Loading } from '@/components/loading' ;
13+ import { GraphQL } from '@/lib/api' ;
1514import { ActionBar } from '../../dashboard/[entityType]/[entitySlug]/dataset/components/action-bar' ;
1615import { Navigation } from '../../dashboard/[entityType]/[entitySlug]/dataset/components/navigate-org-datasets' ;
1716
@@ -51,7 +50,7 @@ export default function DatasetPage({
5150} ) {
5251 const router = useRouter ( ) ;
5352
54- const [ navigationTab , setNavigationTab ] = useQueryState ( 'tab' , parseAsString ) ;
53+ const [ navigationTab , setNavigationTab ] = useState ( 'tab' ) ;
5554
5655 let navigationOptions = [
5756 {
@@ -97,7 +96,8 @@ export default function DatasetPage({
9796 error : any ;
9897 } = useMutation (
9998 [ `delete_Usecase` ] ,
100- ( data : { id : string } ) => GraphQL ( deleteUseCase , { } , { useCaseId : data . id } ) ,
99+ ( data : { id : string } ) =>
100+ GraphQL ( deleteUseCase , { } , { useCaseId : data . id } ) ,
101101 {
102102 onSuccess : ( ) => {
103103 toast ( `Deleted UseCase successfully` ) ;
@@ -113,7 +113,7 @@ export default function DatasetPage({
113113 mutate : any ;
114114 isLoading : boolean ;
115115 error : any ;
116- } = useMutation ( [ `delete_Usecase` ] , ( ) => GraphQL ( AddUseCase , { } , [ ] ) , {
116+ } = useMutation ( [ `delete_Usecase` ] , ( ) => GraphQL ( AddUseCase , { } , [ ] ) , {
117117 onSuccess : ( response : any ) => {
118118 toast ( `UseCase created successfully` ) ;
119119 router . push ( `/manage/usecases/edit/${ response . addUseCase . id } /details` ) ;
0 commit comments