import React, { Component } from 'react'; import Button from 'material-ui/Button'; import { withStyles } from 'material-ui/styles'; import Drawer from 'material-ui/Drawer'; import TaskListContainer from './taskList/TaskListContainer' import TaskResultLayer from './layers/TaskResultLayer' import Tooltip from 'material-ui/Tooltip'; import moment from 'moment' function pad(num) { return ("0"+num).slice(-2); } function hhmmss(secs) { var minutes = Math.floor(secs / 60); secs = secs%60; var hours = Math.floor(minutes/60) minutes = minutes%60; return pad(hours)+":"+pad(minutes)+":"+pad(secs); } const styles = theme => ({ button: { margin: theme.spacing.unit, background: '#05101A', color: '#4CACFF', top: '-6px' }, }); class Header extends Component { constructor(props) { super(props) this.state = { } } componentDidMount() { } goBack() { const { challenge, game, shixun } = this.props // myshixuns/pw346iskxh/stages/rw4v6giml5no // http://localhost:3000/shixuns/cz7yw3en/challenges const url = `/shixuns/${shixun.identifier}/challenges` window.location.href = url; } render() { const { challenge, shixun, loading, grade, classes, user, game, onDrawerButtonClick, onChallengesDrawerClose, power, myshixun_manager, onStarChange, saveChallengeStar, challengesDrawerOpen, taskListLoading, challenges, showSnackbar, closeTaskResultLayer } = this.props // 样式在 tpiPage.css中 /* leftNavDrawer */ return (