diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js index fc75961ec..3c159782a 100644 --- a/public/react/src/modules/paths/PathDetail/DetailCards.js +++ b/public/react/src/modules/paths/PathDetail/DetailCards.js @@ -1,14 +1,14 @@ import React, { Component } from 'react'; import {getImageUrl} from 'educoder'; import {Tooltip,Modal,Icon,Spin,message} from 'antd'; -import '../../paths/ShixunPaths.css'; import DetailCardsEditAndAdd from './DetailCardsEditAndAdd'; import DetailCardsEditAndEdit from './DetailCardsEditAndEdit'; +import AccountProfile from"../user/AccountProfile"; import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import axios from 'axios'; import { DragDropContext , Draggable, Droppable} from 'react-beautiful-dnd'; import Modals from '../../modals/Modals'; - +import '../../paths/ShixunPaths.css'; const $ = window.$ // // //a little function to help us with reordering the result @@ -193,7 +193,12 @@ class DetailCards extends Component{ } startgameid=(id)=>{ - + if(this.props.current_user&&this.props.current_user.profile_completed===false){ + this.setState({ + AccountProfiletype:true + }) + return + } let url = "/shixuns/" + id + "/shixun_exec.json"; axios.get(url).then((response) => { @@ -292,10 +297,16 @@ class DetailCards extends Component{ startshixunCombattype:false }) } - render(){ + hideAccountProfile=()=>{ + this.setState({ + AccountProfiletype:false + }) + } + + render(){ let { pathCardsList, dropid, - dropidtype, + AccountProfiletype, idsum, pathCardsedittype, pathlistedit, @@ -317,6 +328,12 @@ class DetailCards extends Component{ return(