mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-18 02:29:48 +00:00
adding linted files and nvmrc -- will trigger precommit failures
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
ca80ab3b9e
commit
3f87db2eea
65 changed files with 1307 additions and 1137 deletions
|
|
@ -38,7 +38,7 @@ interface UsePaginationParams<T> extends UsePaginationOptions {
|
|||
limit: number;
|
||||
model?: string;
|
||||
order?: string;
|
||||
},
|
||||
}
|
||||
) => Promise<PaginationResponse<T>>;
|
||||
errorMessagePrefix: string;
|
||||
enabled?: boolean;
|
||||
|
|
@ -81,7 +81,7 @@ export function usePagination<T>({
|
|||
const fetchLimit = targetRows || limit;
|
||||
|
||||
try {
|
||||
setState((prev) => ({
|
||||
setState(prev => ({
|
||||
...prev,
|
||||
status: isInitialLoad ? "loading" : "loading-more",
|
||||
error: null,
|
||||
|
|
@ -94,7 +94,7 @@ export function usePagination<T>({
|
|||
...(order && { order }),
|
||||
});
|
||||
|
||||
setState((prev) => ({
|
||||
setState(prev => ({
|
||||
...prev,
|
||||
data: isInitialLoad
|
||||
? response.data
|
||||
|
|
@ -124,14 +124,14 @@ export function usePagination<T>({
|
|||
? new Error(`${errorMessage} ${err.message}`)
|
||||
: new Error(errorMessage);
|
||||
|
||||
setState((prev) => ({
|
||||
setState(prev => ({
|
||||
...prev,
|
||||
error,
|
||||
status: "error",
|
||||
}));
|
||||
}
|
||||
},
|
||||
[limit, model, order, fetchFunction, errorMessagePrefix, client, router],
|
||||
[limit, model, order, fetchFunction, errorMessagePrefix, client, router]
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue