diff --git a/sandpack-client/src/iframe-protocol.ts b/sandpack-client/src/iframe-protocol.ts index 9358bccd4..9f79d4d0f 100644 --- a/sandpack-client/src/iframe-protocol.ts +++ b/sandpack-client/src/iframe-protocol.ts @@ -102,7 +102,6 @@ export class IFrameProtocol { const listenerId = this.channelListenersCount; this.channelListeners[listenerId] = listener; this.channelListenersCount++; - return (): void => { delete this.channelListeners[listenerId]; }; diff --git a/sandpack-react/src/Playground.stories.tsx b/sandpack-react/src/Playground.stories.tsx index d56aa37ec..256efc46c 100644 --- a/sandpack-react/src/Playground.stories.tsx +++ b/sandpack-react/src/Playground.stories.tsx @@ -1,9 +1,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import * as themes from "@codesandbox/sandpack-themes"; -import { useEffect, useState } from "react"; +import { useState } from "react"; import type { CodeEditorProps } from "./components/CodeEditor"; -import { useSandpack } from "./hooks"; import { SANDBOX_TEMPLATES } from "./templates"; import { @@ -18,18 +17,6 @@ export default { title: "Intro/Playground", }; -const Listerner = () => { - const { listen } = useSandpack(); - - useEffect(() => { - const foo = listen(console.log); - - return () => foo(); - }, [listen]); - - return null; -}; - export const Main = (): JSX.Element => { const [config, setConfig] = useState({ Components: { Preview: true, Editor: true, FileExplorer: true }, @@ -155,8 +142,6 @@ export const Main = (): JSX.Element => { showRefreshButton={config.Options?.showRefreshButton} /> )} - -