(
({ label, size, copyright, url, ...others }: ItemProps, ref) => (
({
backgroundColor:
theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[2],
borderRadius: theme.radius.md,
})}
p={2}
>
{label}
{humanFileSize(size, false)}
{copyright && (
© {copyright}
)}
)
);
interface ItemProps extends SelectItemProps {
url: string;
group: string;
size: number;
copyright: string | undefined;
}
const useGetDashboardIcons = () =>
api.icon.all.useQuery(undefined, {
refetchOnMount: false,
// Cache for infinity, refetch every so often.
cacheTime: Infinity,
staleTime: 1000 * 60 * 5, // 5 minutes
refetchOnWindowFocus: false,
});