Skip to content

Commit

Permalink
Chore: Remove setAwarenessField from awarenessContext
Browse files Browse the repository at this point in the history
  • Loading branch information
Vija02 committed Sep 18, 2024
1 parent 83cdb0e commit b27baa5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions apps/remote/src/containers/MainBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ const PluginRenderer = React.memo(
yjsPluginSceneData: getYJSPluginSceneData(sceneId, pluginId),
yjsPluginRendererData: getYJSPluginRendererData(sceneId, pluginId),
awarenessContext: {
awarenessObj: provider?.awareness,
currentUserId,
} as AwarenessContext,
awarenessObj: provider!.awareness!,
currentUserId: currentUserId!,
} satisfies AwarenessContext,
pluginContext: { pluginId, sceneId } as PluginContext,
setRenderCurrentScene: () => {
getYJSPluginRenderer()?.set("currentScene", sceneId);
Expand All @@ -169,7 +169,7 @@ const PluginRenderer = React.memo(
getYJSPluginSceneData,
pluginId,
pluginInfo.plugin,
provider?.awareness,
provider,
sceneId,
tag,
]);
Expand Down
8 changes: 4 additions & 4 deletions apps/renderer/src/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ const PluginRenderer = React.memo(
yjsPluginSceneData: getYJSPluginSceneData(sceneId, pluginId),
yjsPluginRendererData: getYJSPluginRendererData(sceneId, pluginId),
awarenessContext: {
awarenessObj: provider?.awareness,
currentUserId,
} as AwarenessContext,
awarenessObj: provider!.awareness!,
currentUserId: currentUserId!,
} satisfies AwarenessContext,
pluginContext: { pluginId, sceneId },
setRenderCurrentScene: () => {
getYJSPluginRenderer()?.set("currentScene", sceneId);
Expand All @@ -141,7 +141,7 @@ const PluginRenderer = React.memo(
getYJSPluginSceneData,
pluginId,
pluginInfo?.plugin,
provider?.awareness,
provider,
sceneId,
tag,
],
Expand Down
1 change: 0 additions & 1 deletion packages/base-plugin/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export interface IDisposable {
export type AwarenessContext = {
awarenessObj: awarenessProtocol.Awareness;
currentUserId: string;
setAwarenessField: (key: string, val: any) => void;
};

export type AwarenessUserData = {
Expand Down

0 comments on commit b27baa5

Please sign in to comment.