refactor: simplify frontend state and mutation boundaries
Frontend verify / commits (pull_request) Successful in 31s
Frontend verify / security (pull_request) Successful in 11s
Frontend verify / verify (pull_request) Successful in 9m1s
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 10s
Frontend verify / verify (push) Successful in 9m59s

This commit was merged in pull request #44.
This commit is contained in:
2026-09-28 20:01:37 +03:00
parent a4046dbe87
commit a7537da344
25 changed files with 414 additions and 547 deletions
@@ -24,7 +24,6 @@ import { formatMoney, formatSnapshotTime } from "@/shared/lib";
import type { StocksPageVm } from "./StocksPage.vm";
import classes from "./StocksPage.module.css";
import { useStocksPageViewVm } from "./StocksPageView.vm";
type StocksPageViewProps = { vm: StocksPageVm };
@@ -139,7 +138,8 @@ const StocksPageViewResults: FC<StocksPageViewProps> = (props) => {
};
const StocksPageView: FC<StocksPageViewProps> = (props) => {
const { onChange, t, vm } = useStocksPageViewVm(props);
const { vm } = props;
const { t } = useTranslation();
return (
<Stack gap="lg">
@@ -164,7 +164,7 @@ const StocksPageView: FC<StocksPageViewProps> = (props) => {
<TextInput
label={t("stock.searchLabel")}
maxLength={80}
onChange={onChange}
onChange={vm.onQueryChange}
placeholder={t("stock.searchPlaceholder")}
size="md"
value={vm.query}