mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #26326 from overleaf/td-clean-up-scope-store
Create separate window.overleaf.unstable.store based on React context values GitOrigin-RevId: 68f070a6fc5e2965a82720024d91b16fa622b28b
This commit is contained in:
@@ -81,6 +81,13 @@ export const IdeReactProvider: FC<React.PropsWithChildren> = ({ children }) => {
|
||||
const [scopeEventEmitter] = useState(
|
||||
() => new ReactScopeEventEmitter(eventEmitter)
|
||||
)
|
||||
const [unstableStore] = useState(() => {
|
||||
const store = new ReactScopeValueStore()
|
||||
// Add dummy editor.ready key for Writefull, that relies on this calling
|
||||
// back once after watching it
|
||||
store.set('editor.ready', undefined)
|
||||
return store
|
||||
})
|
||||
const [startedFreeTrial, setStartedFreeTrial] = useState(false)
|
||||
const release = getMeta('ol-ExposedSettings')?.sentryRelease ?? null
|
||||
|
||||
@@ -179,6 +186,7 @@ export const IdeReactProvider: FC<React.PropsWithChildren> = ({ children }) => {
|
||||
ide={ide}
|
||||
scopeStore={scopeStore}
|
||||
scopeEventEmitter={scopeEventEmitter}
|
||||
unstableStore={unstableStore}
|
||||
>
|
||||
{children}
|
||||
</IdeProvider>
|
||||
|
||||
Reference in New Issue
Block a user