import type { Pagination } from "@mantine/core"; import type { ComponentProps } from "react"; import { useTranslation } from "react-i18next"; function useStocksPagePresentationVm() { const { t } = useTranslation(); const getControlProps: ComponentProps["getControlProps"] = control => ({ "aria-label": t(control === "previous" ? "stock.previous" : "stock.next"), }); const getItemProps: ComponentProps["getItemProps"] = page => ({ "aria-label": t("stock.screener.page", { page }), }); return { getControlProps, getItemProps }; } export { useStocksPagePresentationVm };