mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
[web] Remove instances of $scope and _ide (#26297)
* Remove `$scope` from `getMockIde` * Replace `...getMockIde()` by `_id: projectId` * Simplify stories decorator scope.tsx: less reliance on `window` * Update helper editor-providers.jsx: pass data instead directly instead of using `window` * Remove `cleanUpContext` * Remove unused prop `clsiServerId` * Update types to reflect unused properties * Remove comment * Add `ol-chatEnabled` in Storybook * Revert moving `getMeta` outside of the component This causes issues in Storybook GitOrigin-RevId: dc2558ce814c2d738fb39450c57c104f4419efb8
This commit is contained in:
@@ -16,7 +16,6 @@ import {
|
||||
} from '@/features/ide-react/create-ide-event-emitter'
|
||||
import { JoinProjectPayload } from '@/features/ide-react/connection/join-project-payload'
|
||||
import { useConnectionContext } from '@/features/ide-react/context/connection-context'
|
||||
import { getMockIde } from '@/shared/context/mock/mock-ide'
|
||||
import { populateEditorScope } from '@/features/ide-react/scope-adapters/editor-manager-context-adapter'
|
||||
import { postJSON } from '@/infrastructure/fetch-json'
|
||||
import { ReactScopeEventEmitter } from '@/features/ide-react/scope-event-emitter/react-scope-event-emitter'
|
||||
@@ -157,11 +156,11 @@ export const IdeReactProvider: FC<React.PropsWithChildren> = ({ children }) => {
|
||||
|
||||
const ide = useMemo(() => {
|
||||
return {
|
||||
...getMockIde(),
|
||||
_id: projectId,
|
||||
socket,
|
||||
reportError,
|
||||
}
|
||||
}, [socket, reportError])
|
||||
}, [projectId, socket, reportError])
|
||||
|
||||
const value = useMemo(
|
||||
() => ({
|
||||
|
||||
Reference in New Issue
Block a user