mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
Merge pull request #36000 from overleaf/ds-offline-mode-disable-buttons-detached-mode
[WEB] Read network stall state from compile context instead of hook directly for log error buttons in offline mode GitOrigin-RevId: ca898f17960784690a27cea3f234568e4532c870
This commit is contained in:
@@ -21,7 +21,7 @@ import importOverleafModules from '../../../../macros/import-overleaf-module.mac
|
||||
import MaterialIcon from '@/shared/components/material-icon'
|
||||
import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-path'
|
||||
import { useFileTreeOpenContext } from '@/features/ide-react/context/file-tree-open-context'
|
||||
import useIsNetworkStalled from '@/features/ide-react/hooks/use-is-network-stalled'
|
||||
import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context'
|
||||
|
||||
const actionComponents = importOverleafModules(
|
||||
'pdfLogEntryHeaderActionComponents'
|
||||
@@ -62,7 +62,7 @@ function LogEntryHeader({
|
||||
const [locationSpanOverflown, setLocationSpanOverflown] = useState(false)
|
||||
const { findEntityByPath } = useFileTreePathContext()
|
||||
const { openEntity } = useFileTreeOpenContext()
|
||||
const isDisabledDueToNetworkStall = useIsNetworkStalled()
|
||||
const { isNetworkStalled } = useCompileContext()
|
||||
|
||||
useResizeObserver(
|
||||
logLocationSpanRef,
|
||||
@@ -172,7 +172,7 @@ function LogEntryHeader({
|
||||
description={t('go_to_code_location')}
|
||||
overlayProps={{ placement: 'bottom' }}
|
||||
>
|
||||
{isDisabledDueToNetworkStall ? (
|
||||
{isNetworkStalled ? (
|
||||
<span className="d-inline-block">
|
||||
<OLIconButton
|
||||
onClick={onSourceLocationClick}
|
||||
|
||||
Reference in New Issue
Block a user