mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-16 06:27:58 +00:00
feat(UI): Adding linter and prettier for UI (#3156)
This commit is contained in:
parent
61582f327c
commit
e69acbafbf
73 changed files with 1452 additions and 1226 deletions
|
@ -20,7 +20,7 @@ interface UseInfiniteScrollOptions {
|
|||
*/
|
||||
export function useInfiniteScroll(
|
||||
onLoadMore: (() => void) | undefined,
|
||||
options: UseInfiniteScrollOptions = {},
|
||||
options: UseInfiniteScrollOptions = {}
|
||||
) {
|
||||
const { enabled = true, threshold = 0.1, rootMargin = "100px" } = options;
|
||||
const sentinelRef = useRef<HTMLTableRowElement>(null);
|
||||
|
@ -29,7 +29,7 @@ export function useInfiniteScroll(
|
|||
if (!onLoadMore || !enabled) return;
|
||||
|
||||
const observer = new IntersectionObserver(
|
||||
(entries) => {
|
||||
entries => {
|
||||
const [entry] = entries;
|
||||
if (entry.isIntersecting) {
|
||||
onLoadMore();
|
||||
|
@ -38,7 +38,7 @@ export function useInfiniteScroll(
|
|||
{
|
||||
threshold,
|
||||
rootMargin,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const sentinel = sentinelRef.current;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue