feat: update demo page + add city_id for media and articles
This commit is contained in:
@@ -40,7 +40,13 @@ export const CityEditPage = observer(() => {
|
||||
>(null);
|
||||
const { language } = languageStore;
|
||||
const { id } = useParams();
|
||||
const { editCityData, editCity, getCity, setEditCityData, setEditCityWeatherCode } = cityStore;
|
||||
const {
|
||||
editCityData,
|
||||
editCity,
|
||||
getCity,
|
||||
setEditCityData,
|
||||
setEditCityWeatherCode,
|
||||
} = cityStore;
|
||||
const { getCountries } = countryStore;
|
||||
const { getMedia, getOneMedia } = mediaStore;
|
||||
|
||||
@@ -108,7 +114,7 @@ export const CityEditPage = observer(() => {
|
||||
: null;
|
||||
const effectiveArmsUrl = isMediaIdEmpty(editCityData.arms)
|
||||
? null
|
||||
: selectedMedia?.id ?? editCityData.arms;
|
||||
: (selectedMedia?.id ?? editCityData.arms);
|
||||
|
||||
if (isLoadingData) {
|
||||
return (
|
||||
@@ -185,7 +191,6 @@ export const CityEditPage = observer(() => {
|
||||
label="Код города для погоды"
|
||||
type="number"
|
||||
value={editCityData.weather_city_code ?? 0}
|
||||
helperText="Числовой код города в источнике погоды (Кранштат)"
|
||||
onChange={(e) => setEditCityWeatherCode(Number(e.target.value))}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user