feat: add stock screener
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import type { Pagination } from "@mantine/core";
|
||||
import type { ComponentProps } from "react";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
function useStocksPagePresentationVm() {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const getControlProps: ComponentProps<typeof Pagination>["getControlProps"] = control => ({
|
||||
"aria-label": t(control === "previous" ? "stock.previous" : "stock.next"),
|
||||
});
|
||||
|
||||
const getItemProps: ComponentProps<typeof Pagination>["getItemProps"] = page => ({
|
||||
"aria-label": t("stock.screener.page", { page }),
|
||||
});
|
||||
|
||||
return { getControlProps, getItemProps };
|
||||
}
|
||||
|
||||
export { useStocksPagePresentationVm };
|
||||
Reference in New Issue
Block a user