'use client' import React, { useCallback, useRef } from 'react' import { useTranslation } from '../../../../providers/Translation/index.js' import { useFocusableItem } from '../TreeFocusContext.js' type LoadMoreButtonProps = { id: string onLoadMore: (() => Promise) | (() => void) } export const LoadMoreButton: React.FC = ({ id, onLoadMore }) => { const { t } = useTranslation() const buttonRef = useRef(null) const { handleFocus, tabIndex } = useFocusableItem({ id, type: 'load-more', ref: buttonRef, }) const handleClick = useCallback(async () => { await onLoadMore() }, [onLoadMore]) return ( ) }