Skip to content

Commit 2fac891

Browse files
author
bhavabhuthi
committed
feat: replace the error fallback page
1 parent ac9deb1 commit 2fac891

File tree

1 file changed

+6
-7
lines changed
  • app/[locale]/(user)/categories/[categorySlug]

1 file changed

+6
-7
lines changed

app/[locale]/(user)/categories/[categorySlug]/page.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
'use client';
22

3-
import { useEffect, useReducer, useState } from 'react';
4-
import Image from 'next/image';
5-
import { useRouter } from 'next/navigation';
63
import GraphqlPagination from '@/app/[locale]/dashboard/components/GraphqlPagination/graphqlPagination';
74
import { fetchDatasets } from '@/fetch';
85
import { graphql } from '@/gql';
96
import { useQuery } from '@tanstack/react-query';
7+
import Image from 'next/image';
8+
import { useRouter } from 'next/navigation';
109
import { Pill, SearchInput, Select, Text } from 'opub-ui';
10+
import { useEffect, useReducer, useState } from 'react';
1111

12-
import { GraphQL } from '@/lib/api';
1312
import BreadCrumbs from '@/components/BreadCrumbs';
13+
import { ErrorPage } from '@/components/error';
1414
import { Loading } from '@/components/loading';
15+
import { GraphQL } from '@/lib/api';
1516
import Card from '../../datasets/components/Card';
1617
import Filter from '../../datasets/components/FIlter/Filter';
1718

@@ -247,9 +248,7 @@ const CategoryDetailsPage = ({ params }: { params: { categorySlug: any } }) => {
247248
/>
248249

249250
{getCategoryDetails.isError ? (
250-
<div className="text font-Medium flex h-[680px] w-full flex-col items-center justify-center gap-4 text-600">
251-
Error fetching data. Please try again later.
252-
</div>
251+
<ErrorPage />
253252
) : getCategoryDetails.isLoading ? (
254253
<Loading />
255254
) : (

0 commit comments

Comments
 (0)