Skip to content

Commit

Permalink
Nando's PR review comments done
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammed-Mamoun98 committed Dec 5, 2024
1 parent 90ed536 commit 0d8ec81
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { HStack, PaginationNextTrigger, PaginationPrevTrigger } from "@chakra-ui/react";
import { PaginationItems, PaginationRoot } from "./ui/pagination";
import { HStack } from "@chakra-ui/react";
import {
PaginationItems,
PaginationNextTrigger,
PaginationPrevTrigger,
PaginationRoot,
} from "@idos-network/ui-kit";

export default function GrantsPagination({
export function Pagination({
count,
pageSize,
page,
Expand Down
8 changes: 4 additions & 4 deletions apps/dashboard-for-dapps/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ import { matchSorter } from "match-sorter";
import { useMemo, useRef, useState } from "react";
import nacl from "tweetnacl";

import GrantsPagination from "@/components/grants-pagination";
import { Pagination } from "@/components/pagination";
import { useIdOS } from "@/idOS.provider";
import { mockFetchAccessGrants } from "@/mokc/access-grants";
import { mockFetchAccessGrants } from "@/mock/access-grants";

export const Route = createFileRoute("/")({
component: Index,
Expand All @@ -69,7 +69,7 @@ function transformBase85Image(src: string) {

const useFetchGrants = (page: number) => {
return useQuery({
queryKey: ["grants", page],
queryKey: ["grants", { page }],
queryFn: () => mockFetchAccessGrants(page, 5),
select: (data) => ({
...data,
Expand Down Expand Up @@ -469,7 +469,7 @@ function SearchResults({
</Button>
</Stack>
))}
<GrantsPagination count={results.totalRecords} pageSize={5} setPage={setPage} page={page} />
<Pagination count={results.totalRecords} pageSize={5} setPage={setPage} page={page} />
<SecretKeyPrompt
{...{ open: openSecretKeyPrompt, toggle: toggleSecretKeyPrompt, onSubmit: onKeySubmit }}
/>
Expand Down
4 changes: 3 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"./password-input": "./src/components/password-input.tsx",
"./provider": "./src/components/provider.tsx",
"./refresh-button": "./src/components/refresh-button.tsx",
"./search-field": "./src/components/search-field.tsx"
"./search-field": "./src/components/search-field.tsx",
"./pagination": "./src/components/pagination.tsx",
"./link-button": "./src/components/link-button.tsx"
},
"scripts": {
"lint": "biome check --apply ./src",
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ export * from "./password-input";
export * from "./provider";
export * from "./refresh-button";
export * from "./search-field";
export * from "./pagination";
export * from "./link-button";
File renamed without changes.
File renamed without changes.

0 comments on commit 0d8ec81

Please sign in to comment.