Hotfix Отображение верхнего блока

This commit is contained in:
Александр Сироткин 2022-11-22 07:24:23 +05:00
parent 51ac260c74
commit a2d641abdd

View File

@ -64,6 +64,11 @@ const Well = memo(() => {
{ actionName: 'Изменение данных скважины', well } { actionName: 'Изменение данных скважины', well }
), [well]) ), [well])
const setBlock = useCallback((value) => {
setTopRightBlock(() => value)
return () => setTopRightBlock(undefined)
}, [])
useEffect(() => { useEffect(() => {
invokeWebApiWrapperAsync( invokeWebApiWrapperAsync(
async () => { async () => {
@ -85,7 +90,7 @@ const Well = memo(() => {
<RootPathContext.Provider value={rootPath}> <RootPathContext.Provider value={rootPath}>
<WellContext.Provider value={[well, updateWell]}> <WellContext.Provider value={[well, updateWell]}>
<FastRunMenu /> <FastRunMenu />
<TopRightBlockContext.Provider value={setTopRightBlock}> <TopRightBlockContext.Provider value={setBlock}>
<Routes> <Routes>
<Route index element={<Navigate to={'telemetry'} replace />} /> <Route index element={<Navigate to={'telemetry'} replace />} />
<Route path={'*'} element={<NoAccessComponent />} /> <Route path={'*'} element={<NoAccessComponent />} />