forked from ddrilling/asb_cloud_front
CF2-27 На страницу выбора куста по карте добавить header
This commit is contained in:
parent
13f56cda57
commit
a90f34a0af
@ -4,6 +4,7 @@ import {Link} from "react-router-dom";
|
|||||||
import LoaderPortal from '../components/LoaderPortal'
|
import LoaderPortal from '../components/LoaderPortal'
|
||||||
import { useState, useEffect } from "react";
|
import { useState, useEffect } from "react";
|
||||||
import {ClusterService} from '../services/api'
|
import {ClusterService} from '../services/api'
|
||||||
|
import notify from '../components/notify'
|
||||||
|
|
||||||
const calcViewParams = (clusters) => {
|
const calcViewParams = (clusters) => {
|
||||||
if (clusters.length === 0)
|
if (clusters.length === 0)
|
||||||
@ -34,8 +35,10 @@ export default function Deposit() {
|
|||||||
try{
|
try{
|
||||||
const data = await ClusterService.getClusters()
|
const data = await ClusterService.getClusters()
|
||||||
setClustersData(data)
|
setClustersData(data)
|
||||||
}catch{
|
}
|
||||||
//ignore
|
catch(ex) {
|
||||||
|
notify(`Не удалось загрузить список кустов`, 'error')
|
||||||
|
console.log(ex)
|
||||||
}
|
}
|
||||||
setShowLoader(false)
|
setShowLoader(false)
|
||||||
}
|
}
|
||||||
@ -59,7 +62,7 @@ export default function Deposit() {
|
|||||||
>
|
>
|
||||||
<Link to={`/cluster/${cluster.id}`}>
|
<Link to={`/cluster/${cluster.id}`}>
|
||||||
<img width={40} src={pointer} alt="+"/>
|
<img width={40} src={pointer} alt="+"/>
|
||||||
<span>{cluster.name}</span>
|
<span>{cluster.caption}</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
</Overlay >)}
|
</Overlay >)}
|
||||||
|
Loading…
Reference in New Issue
Block a user