import { t, Trans } from "@lingui/macro" import { Menu } from "@mantine/core" import { showNotification } from "@mantine/notifications" import { client } from "app/client" import { reloadEntries } from "app/slices/entries" import { useAppDispatch } from "app/store" import { TbRotateClockwise, TbWorldDownload } from "react-icons/tb" interface RefreshMenuProps { control: React.ReactElement } const iconSize = 16 export function RefreshMenu(props: RefreshMenuProps) { const dispatch = useAppDispatch() return ( {props.control} } onClick={() => dispatch(reloadEntries())}> Reload } onClick={() => client.feed.refreshAll().then(() => showNotification({ message: t`Your feeds have been queued for refresh.`, color: "green", }) ) } > Fetch all my feeds now ) }