Skip to content

Commit 626db9c

Browse files
committed
fix build issue without removing useQueryState state
1 parent a7c2fbc commit 626db9c

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

app/[locale]/manage/layout.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import { SidebarNavItem } from '@/types';
66

77
import { cn } from '@/lib/utils';
88
import BreadCrumbs from '@/components/BreadCrumbs';
9-
10-
import styles from '../dashboard/components/styles.module.scss';
11-
import { MobileDashboardNav } from '../dashboard/components/mobile-dashboard-nav';
129
import { DashboardNav } from '../dashboard/components/dashboard-nav';
10+
import { MobileDashboardNav } from '../dashboard/components/mobile-dashboard-nav';
11+
import styles from '../dashboard/components/styles.module.scss';
12+
import LoadingPage from '../dashboard/loading';
1313

1414
interface DashboardLayoutProps {
1515
children?: React.ReactNode;
@@ -26,21 +26,19 @@ export default function OrgDashboardLayout({ children }: DashboardLayoutProps) {
2626
href: `/manage/usecases`,
2727
icon: 'datasetEdit',
2828
},
29-
3029
];
3130

3231
const organizationId = params.organizationId;
3332

3433
return (
35-
<>
34+
<React.Suspense fallback={<LoadingPage />}>
3635
<BreadCrumbs
3736
data={[
3837
{ href: '/', label: 'Home' },
3938
{
4039
href: '',
4140
label: 'Manage',
4241
},
43-
4442
]}
4543
/>
4644
<div
@@ -60,6 +58,6 @@ export default function OrgDashboardLayout({ children }: DashboardLayoutProps) {
6058
</div>
6159
<div className={cn(styles.Main)}>{children}</div>
6260
</div>
63-
</>
61+
</React.Suspense>
6462
);
6563
}

app/[locale]/manage/usecases/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ export default function DatasetPage({
9797
error: any;
9898
} = useMutation(
9999
[`delete_Usecase`],
100-
(data: { id: string }) => GraphQL(deleteUseCase,{}, { useCaseId: data.id }),
100+
(data: { id: string }) =>
101+
GraphQL(deleteUseCase, {}, { useCaseId: data.id }),
101102
{
102103
onSuccess: () => {
103104
toast(`Deleted UseCase successfully`);
@@ -113,7 +114,7 @@ export default function DatasetPage({
113114
mutate: any;
114115
isLoading: boolean;
115116
error: any;
116-
} = useMutation([`delete_Usecase`], () => GraphQL(AddUseCase,{}, []), {
117+
} = useMutation([`delete_Usecase`], () => GraphQL(AddUseCase, {}, []), {
117118
onSuccess: (response: any) => {
118119
toast(`UseCase created successfully`);
119120
router.push(`/manage/usecases/edit/${response.addUseCase.id}/details`);

0 commit comments

Comments
 (0)