Skip to content

remove load solution button #191

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

Merged
merged 1 commit into from
Apr 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove load solution button
  • Loading branch information
ShMcK committed Apr 5, 2020
commit 3d3ee3a86da16ff601926306ce6f2274535415c3
36 changes: 0 additions & 36 deletions web-app/src/components/NewUserExperience/NuxTutorial.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import { Collapse, Icon } from '@alifd/next'
import Button from '../Button'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import './transition.css'

Expand All @@ -27,27 +26,6 @@ const styles = {
},
}

type LoadSolutionButtonProps = {
onLoadSolution: () => void
close: () => void
}

const LoadSolutionButton = (props: LoadSolutionButtonProps) => {
const [loadedSolution, setLoadedSolution] = React.useState(false)
const onClickHandler = () => {
props.close()
if (!loadedSolution) {
setLoadedSolution(true)
props.onLoadSolution()
}
}
return (
<Button type="secondary" onClick={onClickHandler} disabled={loadedSolution}>
Load Solution
</Button>
)
}

type NuxProps = {
onClose: () => void
onLoadSolution: () => void
Expand Down Expand Up @@ -113,20 +91,6 @@ const NewUserExperienceTutorialCollapsible = (props: NuxProps) => {
Read the tests. The tests can be found in the test directory and can be read in detail to help you
understand what's failing.
</li>
<br />
<li>
Still stuck? Load the solution. Each step in CodeRoad is stored as a Git commit - including the solution.
Load the solution commit by pressing the button below.
<br />
<br />
<LoadSolutionButton
onLoadSolution={props.onLoadSolution}
close={() => {
setExpandedKeys([])
props.onClose()
}}
/>
</li>
</ol>
</Panel>
<Panel title="Contact">
Expand Down