fix: Fix errors
This commit is contained in:
		| @@ -6,7 +6,7 @@ import { | ||||
|   selectedCityStore, | ||||
|   cityStore, | ||||
| } from "@shared"; | ||||
| import { useEffect, useState, useMemo } from "react"; | ||||
| import { useEffect, useState } from "react"; | ||||
| import { observer } from "mobx-react-lite"; | ||||
| import { Eye, Pencil, Trash2, Minus } from "lucide-react"; | ||||
| import { useNavigate } from "react-router-dom"; | ||||
| @@ -91,6 +91,7 @@ export const StationListPage = observer(() => { | ||||
|       width: 140, | ||||
|       align: "center", | ||||
|       headerAlign: "center", | ||||
|       sortable: false, | ||||
|  | ||||
|       renderCell: (params: GridRenderCellParams) => { | ||||
|         return ( | ||||
| @@ -116,7 +117,7 @@ export const StationListPage = observer(() => { | ||||
|   ]; | ||||
|  | ||||
|   // Фильтрация станций по выбранному городу | ||||
|   const filteredStations = useMemo(() => { | ||||
|   const filteredStations = () => { | ||||
|     const { selectedCityId } = selectedCityStore; | ||||
|     if (!selectedCityId) { | ||||
|       return stationLists[language].data; | ||||
| @@ -124,9 +125,9 @@ export const StationListPage = observer(() => { | ||||
|     return stationLists[language].data.filter( | ||||
|       (station: any) => station.city_id === selectedCityId | ||||
|     ); | ||||
|   }, [stationLists, language, selectedCityStore.selectedCityId]); | ||||
|   }; | ||||
|  | ||||
|   const rows = filteredStations.map((station: any) => ({ | ||||
|   const rows = filteredStations().map((station: any) => ({ | ||||
|     id: station.id, | ||||
|     name: station.name, | ||||
|     system_name: station.system_name, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user