Skip to content

Commit

Permalink
chore: rename frameid -> iframeid
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Mar 18, 2024
1 parent dfa87fa commit c6cfd48
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/other/jupyterlite/JupyterLiteSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import MessageHandler from "./MessageHandler";
interface JupyterLiteSessionProps {
originURL: string;
defaultNotebookPath?: string;
frameId: string;
iframeId: string;
messageHandler?: MessageHandler;
}

const defaultProps: JupyterLiteSessionProps = {
// eslint-disable-next-line react/default-props-match-prop-types
originURL: "https://jupyterlite.mat3ra.com",
// eslint-disable-next-line react/default-props-match-prop-types
frameId: "jupyter-lite-iframe",
iframeId: "jupyter-lite-iframe",
};

class JupyterLiteSession extends React.Component<JupyterLiteSessionProps> {
Expand All @@ -25,8 +25,8 @@ class JupyterLiteSession extends React.Component<JupyterLiteSessionProps> {
}

componentDidMount() {
const { messageHandler, originURL, frameId } = this.props;
messageHandler?.init(originURL, frameId);
const { messageHandler, originURL, iframeId } = this.props;
messageHandler?.init(originURL, iframeId);
}

componentWillUnmount() {
Expand All @@ -35,7 +35,7 @@ class JupyterLiteSession extends React.Component<JupyterLiteSessionProps> {
}

render() {
const { defaultNotebookPath, originURL, frameId } = this.props;
const { defaultNotebookPath, originURL, iframeId } = this.props;
const src = defaultNotebookPath
? `${originURL}/lab/tree?path=${defaultNotebookPath}`
: `${originURL}/lab`;
Expand All @@ -44,7 +44,7 @@ class JupyterLiteSession extends React.Component<JupyterLiteSessionProps> {
<iframe
name="jupyterlite"
title="JupyterLite"
id={frameId}
id={iframeId}
src={src}
sandbox="allow-scripts allow-same-origin allow-popups allow-forms allow-modals allow-top-navigation-by-user-activation allow-downloads"
width="100%"
Expand Down

0 comments on commit c6cfd48

Please sign in to comment.