File tree Expand file tree Collapse file tree 2 files changed +7
-81
lines changed
Expand file tree Collapse file tree 2 files changed +7
-81
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
22import styled from "styled-components" ;
3+ import { useParams } from "react-router-dom" ;
34import Skeleton from "react-loading-skeleton" ;
45import { StandardPagination } from "@kleros/ui-components-library" ;
56import { isUndefined } from "utils/index" ;
7+ import { decodeURIFilter } from "utils/uri" ;
68import { DisputeDetailsFragment } from "queries/useCasesQuery" ;
7- import { useFiltersContext } from "context/FilterProvider" ;
89import DisputeCard from "components/DisputeCard" ;
910
1011const Container = styled . div `
@@ -43,7 +44,9 @@ const CasesGrid: React.FC<ICasesGrid> = ({
4344 currentPage,
4445 setCurrentPage,
4546} ) => {
46- const { debouncedSearch } = useFiltersContext ( ) ;
47+ const { filter } = useParams ( ) ;
48+ const decodedFilter = decodeURIFilter ( filter ?? "all" ) ;
49+ const { id : searchValue } = decodedFilter ;
4750
4851 return (
4952 < >
@@ -57,13 +60,13 @@ const CasesGrid: React.FC<ICasesGrid> = ({
5760 </ Container >
5861 ) }
5962
60- { debouncedSearch === "" && (
63+ { isUndefined ( searchValue ) ? (
6164 < StyledPagination
6265 currentPage = { currentPage }
6366 numPages = { Math . ceil ( totalPages ?? 0 ) }
6467 callback = { ( page : number ) => setCurrentPage ( page ) }
6568 />
66- ) }
69+ ) : null }
6770 </ >
6871 ) ;
6972} ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments