mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #26928 from overleaf/td-remove-use-scope-value
Remove useScopeValue and its associated store GitOrigin-RevId: 439d6eb16343f65695ef615a9ff697d0cc5ad2c7
This commit is contained in:
@@ -27,8 +27,5 @@ export const mockScope = (
|
||||
refreshResolvedCommentsDropdown: cy.stub(() => sleep(1000)),
|
||||
onlineUserCursorHighlights: {},
|
||||
permissionsLevel: 'owner',
|
||||
$on: cy.stub().log(false),
|
||||
$broadcast: cy.stub().log(false),
|
||||
$emit: cy.stub().log(false),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,7 @@ import React, {
|
||||
type FC,
|
||||
type PropsWithChildren,
|
||||
} from 'react'
|
||||
import {
|
||||
createReactScopeValueStore,
|
||||
IdeReactContext,
|
||||
} from '@/features/ide-react/context/ide-react-context'
|
||||
import { IdeReactContext } from '@/features/ide-react/context/ide-react-context'
|
||||
import { IdeEventEmitter } from '@/features/ide-react/create-ide-event-emitter'
|
||||
import { ReactScopeValueStore } from '@/features/ide-react/scope-value-store/react-scope-value-store'
|
||||
import { ReactScopeEventEmitter } from '@/features/ide-react/scope-event-emitter/react-scope-event-emitter'
|
||||
@@ -300,11 +297,6 @@ const makeIdeReactProvider = (
|
||||
}))
|
||||
|
||||
const [ideContextValue] = useState(() => {
|
||||
const scopeStore = createReactScopeValueStore()
|
||||
for (const [key, value] of Object.entries(scope)) {
|
||||
// TODO: path for nested entries
|
||||
scopeStore.set(key, value)
|
||||
}
|
||||
const scopeEventEmitter = new ReactScopeEventEmitter(
|
||||
new IdeEventEmitter()
|
||||
)
|
||||
@@ -312,7 +304,6 @@ const makeIdeReactProvider = (
|
||||
|
||||
return {
|
||||
socket,
|
||||
scopeStore,
|
||||
scopeEventEmitter,
|
||||
unstableStore,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user