get rid of most errors on Home page for migration

This commit is contained in:
fbruc03 2022-12-04 21:09:54 +01:00
parent 77b338ffb6
commit d6d2505a4b
11 changed files with 29 additions and 32 deletions

View File

@ -81,6 +81,7 @@ export const login =
axios
.post(`${process.env.REACT_APP_BLOCKLY_API}/user`, body, config)
.then((res) => {
console.log(res);
dispatch(setLanguage(res.data.user.language));
dispatch({
type: LOGIN_SUCCESS,

View File

@ -611,7 +611,6 @@ class Toolbox extends React.Component {
colour={getColour().procedures}
custom="PROCEDURE"
></Category>
<sep></sep>
<Category name={Blockly.Msg.toolbox_advanced} colour={getColour().io}>
<Category
name={Blockly.Msg.toolbox_serial}

View File

@ -142,7 +142,7 @@ class Navbar extends Component {
</Link>
) : null}
{isHome ? (
<Tooltip title={Blockly.Msg.tooltip_start_tour} arrow>
<Tooltip title={'Start Tour'} arrow>
<IconButton
color="inherit"
className={`openTour ${this.props.classes.button}`}
@ -156,7 +156,7 @@ class Navbar extends Component {
</Tooltip>
) : null}
{isAssessment ? (
<Tooltip title={Blockly.Msg.tooltip_start_tour} arrow>
<Tooltip title={'Start tour'} arrow>
<IconButton
color="inherit"
className={`openTour ${this.props.classes.button}`}
@ -267,7 +267,7 @@ class Navbar extends Component {
<FontAwesomeIcon icon={item.icon} />
</ListItemIcon>
{item.text === "Code Editor" ? (
<Badge badgeContent={"Experimental"} color="primary">
<Badge badgeContent={"Experimental"} color="primary" overlap="rectangular">
<ListItemText primary={item.text} />
</Badge>
) : (

View File

@ -53,7 +53,7 @@ class TooltipViewer extends Component {
{Blockly.Msg.tooltip_viewer}
</Typography>
<Typography variant="body2" component="p">
<Typography variant="body2" component="span">
<ReactMarkdown linkTarget="_blank">
{this.props.tooltip}
</ReactMarkdown>

View File

@ -58,8 +58,8 @@ AutoSave.propTypes = {
xml: PropTypes.string.isRequired,
name: PropTypes.string,
workspaceName: PropTypes.func.isRequired,
setAutosave: PropTypes.func.isRequired,
autosave: PropTypes.bool.isRequired,
setAutosave: PropTypes.func,
autosave: PropTypes.bool,
};
const mapStateToProps = (state) => ({

View File

@ -57,7 +57,7 @@ class DownloadProject extends Component {
DownloadProject.propTypes = {
xml: PropTypes.string.isRequired,
name: PropTypes.string.isRequired
name: PropTypes.string
};
const mapStateToProps = state => ({

View File

@ -129,7 +129,7 @@ OpenProject.propTypes = {
clearStats: PropTypes.func.isRequired,
workspaceName: PropTypes.func.isRequired,
xml: PropTypes.string.isRequired,
name: PropTypes.string.isRequired
name: PropTypes.string
};
const mapStateToProps = state => ({

View File

@ -301,7 +301,7 @@ class WorkspaceFunc extends Component {
WorkspaceFunc.propTypes = {
shareProject: PropTypes.func.isRequired,
clearMessages: PropTypes.func.isRequired,
name: PropTypes.string.isRequired,
name: PropTypes.string,
message: PropTypes.object.isRequired,
};

View File

@ -99,7 +99,7 @@ class WorkspaceFunc extends Component {
WorkspaceFunc.propTypes = {
user: PropTypes.object,
autosave: PropTypes.bool.isRequired,
autosave: PropTypes.bool,
};
const mapStateToProps = (state) => ({

View File

@ -105,8 +105,7 @@ class WorkspaceName extends Component {
return (
<div style={this.props.style}>
<Tooltip
title={`${Blockly.Msg.tooltip_project_title} ${
this.props.name ? `: ${this.props.name}` : ""
title={`${Blockly.Msg.tooltip_project_title} ${this.props.name ? `: ${this.props.name}` : ""
}`}
arrow
style={{ height: "100%" }}

View File

@ -11,9 +11,7 @@ store.dispatch(fetchSensors());
fetchSensors();
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
<App />,
document.getElementById("root")
);