OSDN Git Service

add the switch tutorial for transaction page.
authorZhiting Lin <zlin035@uottawa.ca>
Thu, 31 May 2018 10:04:25 +0000 (18:04 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Thu, 31 May 2018 10:04:25 +0000 (18:04 +0800)
src/features/transactions/components/New/New.jsx
src/features/tutorial/components/Tutorial.jsx
src/features/tutorial/components/TutorialForm/TutorialForm.jsx

index 2831c29..74bc8e9 100644 (file)
@@ -166,7 +166,7 @@ class Form extends React.Component {
             />}
 
           </div>
-          <Tutorial types={['TutorialForm']} />
+          <Tutorial types={['TutorialForm']} advTx={this.state.showAdvanceTx}/>
         </div>
       </div>
     )
index 342a959..15f9c1f 100644 (file)
@@ -17,6 +17,7 @@ class Tutorial extends React.Component {
       <div>
         {this.props.content && tutorialOpen && (tutorialTypes.includes(this.props.content['component'])) &&
           <TutorialComponent
+            advTx={this.props.advTx}
             {...this.props.content}
           />}
       </div>
index 7ba796c..24c3f84 100644 (file)
@@ -3,15 +3,16 @@ import styles from './TutorialForm.scss'
 
 class TutorialForm extends React.Component {
   render() {
+    let content = this.props.advTx? this.props.content_ad: this.props.content
     return (
       <div className={styles.container}>
         <div className={`${styles.tutorialContainer} ${styles.fixedTutorial}`}>
           <div className={styles.header}>
-            {this.props.content['header']}
+            {content['header']}
           </div>
           <div className={styles.list}>
             <table className={styles.listItemContainer}>
-              {this.props.content['steps'].map(function (contentLine, i){
+              {content['steps'].map(function (contentLine, i){
                 let title = contentLine['title']
                 let rows = [
                   <tr key={`item-title-${i}`}>