Skip to content

Commit

Permalink
fix 🐛: pagination spell error
Browse files Browse the repository at this point in the history
  • Loading branch information
BQXBQX committed Oct 30, 2024
1 parent ef98f85 commit f474376
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/ui-react/lib/Pagination/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface PaginationProps
disabled?: boolean;
}

export const PaginiationStoreContext = createContext<
export const PaginationStoreContext = createContext<
{ onChange?: (value: number) => void; activePage?: number } | undefined
>(undefined);

Expand Down Expand Up @@ -224,7 +224,7 @@ export const Pagination = React.forwardRef<HTMLDivElement, PaginationProps>(
className={`${PaginationClass} ${className}`}
{...rest}
>
<PaginiationStoreContext.Provider value={{ onChange, activePage }}>
<PaginationStoreContext.Provider value={{ onChange, activePage }}>
<PaginationItem
type="delete"
disabled={currentPage === 1 || disabled}
Expand All @@ -242,7 +242,7 @@ export const Pagination = React.forwardRef<HTMLDivElement, PaginationProps>(
>
<ChevronsRight size={16} />
</PaginationItem>
</PaginiationStoreContext.Provider>
</PaginationStoreContext.Provider>
</div>
);
},
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-react/lib/Pagination/PaginationItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { memo, useCallback, useContext, useEffect, type ReactNode } from 'react';
import { Button, PaginiationStoreContext } from '..';
import { Button, PaginationStoreContext } from '..';
import styles from './Pagination.module.scss';
import { useCurrentPageStore } from './useCurrentPageStore';

Expand Down Expand Up @@ -28,7 +28,7 @@ export const PaginationItemImpl = ({
state.changeCurrentPage,
]);

const paginationStoreContext = useContext(PaginiationStoreContext);
const paginationStoreContext = useContext(PaginationStoreContext);

const handleClick = useCallback((type: 'select' | 'add' | 'delete' | 'none', index?: number) => {
const activePage = paginationStoreContext?.activePage!;
Expand Down

1 comment on commit f474376

@vercel
Copy link

@vercel vercel bot commented on f474376 Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sast-ui – ./

sast-ui-git-main-sast.vercel.app
sast-ui-sast.vercel.app

Please sign in to comment.