refactor: simplify auth and instrument pages
This commit is contained in:
@@ -4,6 +4,8 @@ import { formatDate, formatDecimal, formatMoney } from "@/shared/lib";
|
||||
|
||||
import type { InstrumentChartProps } from "../../model/types";
|
||||
|
||||
import { instrumentPeriods } from "../../model/useInstrumentParameters";
|
||||
|
||||
function useInstrumentChartVm(props: InstrumentChartProps) {
|
||||
const { vm } = props;
|
||||
const { t } = useTranslation();
|
||||
@@ -34,7 +36,7 @@ function useInstrumentChartVm(props: InstrumentChartProps) {
|
||||
return { ...candle, price };
|
||||
});
|
||||
|
||||
const periodOptions = ["month", "halfYear", "year", "all"].map(value => ({
|
||||
const periodOptions = instrumentPeriods.map(value => ({
|
||||
label: t(`stock.periods.${value}`),
|
||||
value,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user