mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #23940 from overleaf/td-react-18
Upgrade to React 18 GitOrigin-RevId: 9b81936e6eea2bccd97fe5c2c5841f0b946371b8
This commit is contained in:
@@ -51,7 +51,11 @@ import { updateRanges } from '@/features/source-editor/extensions/ranges'
|
||||
import { useThreadsContext } from '@/features/review-panel-new/context/threads-context'
|
||||
import { useHunspell } from '@/features/source-editor/hooks/use-hunspell'
|
||||
import { Permissions } from '@/features/ide-react/types/permissions'
|
||||
import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
|
||||
import {
|
||||
GotoOffsetOptions,
|
||||
useEditorManagerContext,
|
||||
} from '@/features/ide-react/context/editor-manager-context'
|
||||
import { GotoLineOptions } from '@/features/ide-react/types/goto-line-options'
|
||||
import { useOnlineUsersContext } from '@/features/ide-react/context/online-users-context'
|
||||
|
||||
function useCodeMirrorScope(view: EditorView) {
|
||||
@@ -441,7 +445,7 @@ function useCodeMirrorScope(view: EditorView) {
|
||||
useScopeEventListener(
|
||||
'editor:gotoLine',
|
||||
useCallback(
|
||||
(_event, options) => {
|
||||
(_event: any, options: GotoLineOptions) => {
|
||||
setCursorLineAndScroll(
|
||||
view,
|
||||
options.gotoLine,
|
||||
@@ -460,7 +464,7 @@ function useCodeMirrorScope(view: EditorView) {
|
||||
useScopeEventListener(
|
||||
'editor:gotoOffset',
|
||||
useCallback(
|
||||
(_event, options) => {
|
||||
(_event: any, options: GotoOffsetOptions) => {
|
||||
setCursorPositionAndScroll(view, options.gotoOffset)
|
||||
},
|
||||
[view]
|
||||
|
||||
Reference in New Issue
Block a user