mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
refactor(client): Refactors recent typescript changes for best practices (#763)
* create common types in client * remove unnecessary rules from eslint config * cleanup types * put back eslintrc rules
This commit is contained in:
parent
5828200197
commit
96d29f7390
32 changed files with 233 additions and 245 deletions
|
|
@ -1,5 +1,12 @@
|
|||
import React from 'react';
|
||||
import { PagesProps } from 'librechat-data-provider';
|
||||
|
||||
type TPagesProps = {
|
||||
pages: number;
|
||||
pageNumber: number;
|
||||
setPageNumber: (pageNumber: number) => void;
|
||||
nextPage: () => Promise<void>;
|
||||
previousPage: () => Promise<void>;
|
||||
};
|
||||
|
||||
export default function Pages({
|
||||
pageNumber,
|
||||
|
|
@ -7,7 +14,7 @@ export default function Pages({
|
|||
nextPage,
|
||||
previousPage,
|
||||
setPageNumber,
|
||||
}: PagesProps) {
|
||||
}: TPagesProps) {
|
||||
const clickHandler =
|
||||
(func: () => Promise<void>) => async (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
e.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue