feat: update demo page + add city_id for media and articles

This commit is contained in:
2026-04-28 10:57:42 +03:00
parent 60c6840db4
commit 94f512e0e4
27 changed files with 499 additions and 222 deletions

View File

@@ -7,7 +7,7 @@ import {
FormControl,
InputLabel,
} from "@mui/material";
import { mediaStore, MEDIA_TYPE_LABELS } from "@shared";
import { mediaStore, MEDIA_TYPE_LABELS, selectedCityStore } from "@shared";
import { observer } from "mobx-react-lite";
import { ArrowLeft, Loader2, Save } from "lucide-react";
import { useState } from "react";
@@ -23,7 +23,7 @@ export const MediaCreatePage = observer(() => {
const handleCreate = async () => {
try {
setIsLoading(true);
await mediaStore.createMedia(name, type);
await mediaStore.createMedia(name, type, selectedCityStore.selectedCityId);
toast.success("Медиа успешно создано");
navigate("/media");
} catch (error) {