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:
Tim Down
2025-07-10 08:08:59 +00:00
committed by Copybot
parent e4a9b13e9a
commit bfa0459e72
7 changed files with 5 additions and 161 deletions
@@ -8,7 +8,6 @@ export type Ide = {
}
type IdeContextValue = Ide & {
scopeStore: ScopeValueStore
scopeEventEmitter: ScopeEventEmitter
unstableStore: ScopeValueStore
}
@@ -18,11 +17,10 @@ export const IdeContext = createContext<IdeContextValue | undefined>(undefined)
export const IdeProvider: FC<
React.PropsWithChildren<{
ide: Ide
scopeStore: ScopeValueStore
scopeEventEmitter: ScopeEventEmitter
unstableStore: ScopeValueStore
}>
> = ({ ide, scopeStore, scopeEventEmitter, unstableStore, children }) => {
> = ({ ide, scopeEventEmitter, unstableStore, children }) => {
/**
* Expose unstableStore via `window.overleaf.unstable.store`, so it can be accessed by external extensions.
*
@@ -49,11 +47,10 @@ export const IdeProvider: FC<
const value = useMemo<IdeContextValue>(() => {
return {
...ide,
scopeStore,
scopeEventEmitter,
unstableStore,
}
}, [ide, scopeStore, scopeEventEmitter, unstableStore])
}, [ide, scopeEventEmitter, unstableStore])
return <IdeContext.Provider value={value}>{children}</IdeContext.Provider>
}