diff --git a/packages/react-sandpack/package.json b/packages/react-sandpack/package.json index 772837da2ab..57fc198fcc3 100644 --- a/packages/react-sandpack/package.json +++ b/packages/react-sandpack/package.json @@ -1,6 +1,6 @@ { "name": "react-smooshpack", - "version": "0.0.55", + "version": "0.0.56", "description": "", "keywords": [], "license": "SEE LICENSE.MD IN ROOT", diff --git a/packages/react-sandpack/src/components/BrowserPreview/BrowserPreview.tsx b/packages/react-sandpack/src/components/BrowserPreview/BrowserPreview.tsx index 3646394feaf..b1a177d682b 100644 --- a/packages/react-sandpack/src/components/BrowserPreview/BrowserPreview.tsx +++ b/packages/react-sandpack/src/components/BrowserPreview/BrowserPreview.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; -import SandpackConsumer from '../SandpackConsumer'; import Preview from '../Preview'; import Navigator from '../Navigator'; diff --git a/packages/react-sandpack/src/components/Navigator/Navigator.tsx b/packages/react-sandpack/src/components/Navigator/Navigator.tsx index 10a8261ca43..07762b9051c 100644 --- a/packages/react-sandpack/src/components/Navigator/Navigator.tsx +++ b/packages/react-sandpack/src/components/Navigator/Navigator.tsx @@ -6,8 +6,6 @@ import RefreshIcon from './RefreshIcon'; import BackwardIcon from './BackwardIcon'; import ForwardIcon from './ForwardIcon'; -import { ENTER } from 'common/utils/keycodes'; - import withSandpack from '../../utils/with-sandpack'; import { ISandpackContext } from '../../types'; import cn from '../../utils/cn'; @@ -117,7 +115,8 @@ class Navigator extends React.Component { }; onKeyDown = (e: React.KeyboardEvent) => { - if (e.keyCode === ENTER) { + if (e.keyCode === 13) { + // Enter e.preventDefault(); e.stopPropagation(); diff --git a/packages/react-sandpack/src/components/Preview/Preview.tsx b/packages/react-sandpack/src/components/Preview/Preview.tsx index 8cb09b222d6..f64a0869718 100644 --- a/packages/react-sandpack/src/components/Preview/Preview.tsx +++ b/packages/react-sandpack/src/components/Preview/Preview.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; import { ISandpackContext } from '../../types'; -import SandpackConsumer from '../SandpackConsumer'; import withSandpack from '../../utils/with-sandpack'; export interface PreviewProps { diff --git a/packages/react-sandpack/src/components/SandpackProvider/SandpackProvider.tsx b/packages/react-sandpack/src/components/SandpackProvider/SandpackProvider.tsx index dc4ed24ae20..eefe0b9cf6a 100644 --- a/packages/react-sandpack/src/components/SandpackProvider/SandpackProvider.tsx +++ b/packages/react-sandpack/src/components/SandpackProvider/SandpackProvider.tsx @@ -4,7 +4,6 @@ import { Manager, generatePackageJSON } from 'smooshpack'; import { listen } from 'codesandbox-api'; import { - IFile, IFiles, IManagerState, ISandpackContext,