Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert React update to fix compatibility with main site #11

Merged
merged 2 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,3 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

.idea
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@monaco-editor/react": "^4.4.6",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^13.5.0",
"firebase": "^7.17.2",
"jszip": "^3.7.1",
"upsilon.js": "^1.4.0",
"nw-react-scripts": "3.4.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-monaco-editor": "^0.47.0",
"react-resize-detector": "^7.0.0",
"react-router-dom": "^6.2.1",
"upsilon.js": "^1.4.0"
"react-router-dom": "^6.2.1"
},
"scripts": {
"start": "nw-react-scripts start",
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Omega IDE</title>
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
10 changes: 5 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Editor from './ide/Editor.js';
import Simulator from './ide/Simulator.js';
import LocalStorageConnector from './LocalStorageConnector.js';
Expand All @@ -9,10 +9,10 @@ function App() {
<div className="App">
<Router>
<div className="body">
<Routes>
<Route index element={<Editor base="/" connector={LocalStorageConnector} vercel={false} />} exact />
<Route path="/simulator" element={Simulator} exact />
</Routes>
<Switch>
<Route path="/" component={() => <Editor base="/" connector={LocalStorageConnector} vercel={false} />} exact />
<Route path="/simulator" component={Simulator} exact />
</Switch>
</div>
</Router>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/ide/Editor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from "react";
import { Navigate } from "react-router-dom";
import { Redirect } from "react-router-dom";
import "../sass/omega.ide.sass";

import File from "./components/File";
Expand Down Expand Up @@ -1819,7 +1819,7 @@ export default class IDEEditor extends Component {
return this.renderEditor();
}
} else if (this.state.logged === false) {
return <Navigate replace to={this.props.base} />;
return <Redirect to={this.props.base} />;
} else {
return this.renderLoading();
}
Expand Down
4 changes: 2 additions & 2 deletions src/ide/components/Monaco.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import React, { Component } from 'react';
import MonacoEditor from '@monaco-editor/react';
import MonacoEditor from 'react-monaco-editor';
import ReactResizeDetector from 'react-resize-detector';

export default class Monaco extends Component {
Expand Down Expand Up @@ -47,7 +47,7 @@ export default class Monaco extends Component {
theme="vs-dark"
value={this.props.value}
onChange={this.handleChange}
onMount={this.editorDidMount}
editorDidMount={this.editorDidMount}
/>
</div>
</ReactResizeDetector>
Expand Down
22,502 changes: 11,268 additions & 11,234 deletions yarn.lock

Large diffs are not rendered by default.