Skip to content
Snippets Groups Projects
Commit d7080abb authored by Marek Veselý's avatar Marek Veselý
Browse files

fix: add suspense to analyst children

parent 2b679f97
No related branches found
No related tags found
No related merge requests found
...@@ -7,11 +7,11 @@ import Sidebar from '@/components/Sidebar' ...@@ -7,11 +7,11 @@ import Sidebar from '@/components/Sidebar'
import useHideButton from '@/components/Sidebar/useHideButton' import useHideButton from '@/components/Sidebar/useHideButton'
import Status from '@/components/Status' import Status from '@/components/Status'
import type { IconName } from '@blueprintjs/core' import type { IconName } from '@blueprintjs/core'
import { Button } from '@blueprintjs/core' import { Button, Spinner } from '@blueprintjs/core'
import useEmailsEnabled from '@inject/graphql/utils/useEmailsEnabled' import useEmailsEnabled from '@inject/graphql/utils/useEmailsEnabled'
import useToolsEnabled from '@inject/graphql/utils/useToolsEnabled' import useToolsEnabled from '@inject/graphql/utils/useToolsEnabled'
import type { FC, PropsWithChildren } from 'react' import type { FC, PropsWithChildren } from 'react'
import { useContext, useMemo } from 'react' import { Suspense, useContext, useMemo } from 'react'
import { matchPath, useLocation } from 'react-router-dom' import { matchPath, useLocation } from 'react-router-dom'
import type { Path } from '../../router' import type { Path } from '../../router'
import { useNavigate, useParams } from '../../router' import { useNavigate, useParams } from '../../router'
...@@ -166,7 +166,7 @@ const NavigationBar: FC<PropsWithChildren> = ({ children }) => { ...@@ -166,7 +166,7 @@ const NavigationBar: FC<PropsWithChildren> = ({ children }) => {
<div style={{ overflow: 'auto', flex: 1 }}> <div style={{ overflow: 'auto', flex: 1 }}>
{exerciseId ? ( {exerciseId ? (
<SVGContext.Provider value={SVGContextValue}> <SVGContext.Provider value={SVGContextValue}>
{children} <Suspense fallback={<Spinner />}>{children}</Suspense>
</SVGContext.Provider> </SVGContext.Provider>
) : ( ) : (
children children
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment