CF2-27 На страницу выбора куста по карте добавить header

This commit is contained in:
Фролов 2021-07-22 10:17:39 +05:00
parent 13f56cda57
commit a90f34a0af

View File

@ -4,6 +4,7 @@ import {Link} from "react-router-dom";
import LoaderPortal from '../components/LoaderPortal'
import { useState, useEffect } from "react";
import {ClusterService} from '../services/api'
import notify from '../components/notify'
const calcViewParams = (clusters) => {
if (clusters.length === 0)
@ -34,8 +35,10 @@ export default function Deposit() {
try{
const data = await ClusterService.getClusters()
setClustersData(data)
}catch{
//ignore
}
catch(ex) {
notify(`Не удалось загрузить список кустов`, 'error')
console.log(ex)
}
setShowLoader(false)
}
@ -59,7 +62,7 @@ export default function Deposit() {
>
<Link to={`/cluster/${cluster.id}`}>
<img width={40} src={pointer} alt="+"/>
<span>{cluster.name}</span>
<span>{cluster.caption}</span>
</Link>
</Overlay >)}