Skip to content

Commit 44b1e59

Browse files
authored
Merge pull request #93 from kleros/fix/registries-grid-responsiveness
feat: improve registries grid responsiveness
2 parents 2a51f06 + 45b7f04 commit 44b1e59

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

web/src/pages/AllLists/RegistriesFetcher.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useRegistryDetailsQuery } from "hooks/queries/useRegistryDetailsQuery";
1111
import { List_filters } from "consts/filters";
1212
import { sortRegistriesByIds } from "utils/sortRegistriesByIds";
1313
import { MAIN_CURATE_ADDRESS } from "src/consts";
14-
import { LG_BREAKPOINT } from "src/styles/breakpoints";
14+
import { LG_BREAKPOINT, SM_BREAKPOINT } from "src/styles/breakpoints";
1515

1616
const RegistriesFetcher: React.FC = () => {
1717
const { page, order, filter } = useParams();
@@ -21,7 +21,7 @@ const RegistriesFetcher: React.FC = () => {
2121
const navigate = useNavigate();
2222
const { width } = useWindowSize();
2323
const location = useListRootPath();
24-
const registriesPerPage = width > LG_BREAKPOINT ? 9 : 3;
24+
const registriesPerPage = width > LG_BREAKPOINT ? 9 : width > SM_BREAKPOINT ? 6 : 3;
2525
const pageNumber = parseInt(page ?? "1", 10);
2626
const registrySkip = registriesPerPage * (pageNumber - 1);
2727

web/src/styles/breakpoints.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export const LG_BREAKPOINT = 900;
2+
export const SM_BREAKPOINT = 600;

0 commit comments

Comments
 (0)