Files
feishin/src/renderer/features/shared/components/refresh-button.tsx
T
Damien Erambert 55a6ea4fca Prevent double fetching when force refreshing paginated views (#1637)
* Prevent double fetching when force refreshing paginated views

* remove await from infinite list loader query invalidation

* add mutation and loading state to list refresh

* add non-suspense query to list genre filters to add loading state

* remove list count data set on random queries

---------

Co-authored-by: jeffvli <jeffvictorli@gmail.com>
2026-02-02 20:25:19 -08:00

30 lines
793 B
TypeScript

import { useTranslation } from 'react-i18next';
import { ActionIcon, ActionIconProps } from '/@/shared/components/action-icon/action-icon';
interface RefreshButtonProps extends ActionIconProps {
loading?: boolean;
}
export const RefreshButton = ({ loading, onClick, ...props }: RefreshButtonProps) => {
const { t } = useTranslation();
return (
<ActionIcon
icon="refresh"
iconProps={{
size: 'lg',
...props.iconProps,
}}
loading={loading}
onClick={onClick}
tooltip={{
label: t('common.refresh', { postProcess: 'sentenceCase' }),
...props.tooltip,
}}
variant="subtle"
{...props}
/>
);
};