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 axios
.post(`${process.env.REACT_APP_BLOCKLY_API}/user`, body, config) .post(`${process.env.REACT_APP_BLOCKLY_API}/user`, body, config)
.then((res) => { .then((res) => {
console.log(res);
dispatch(setLanguage(res.data.user.language)); dispatch(setLanguage(res.data.user.language));
dispatch({ dispatch({
type: LOGIN_SUCCESS, type: LOGIN_SUCCESS,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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