Skip to content

Commit 0d8f700

Browse files
author
vikasrohit
authored
Merge pull request #1286 from appirio-tech/dev
Change Watson Chatbot project title
2 parents a19b023 + cb58f59 commit 0d8f700

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/config/projectWizard/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const products = {
4444
'Watson Chatbot': {
4545
brief: 'Watson Chatbot',
4646
details: 'Build Chatbot using IBM Watson',
47+
formTitle: 'Chatbot powered by IBM Watson®',
4748
icon: 'product-chatbot-watson',
4849
id: 'watson_chatbot',
4950
aliases: ['watson_chatbot'],

src/projects/create/components/FillProjectDetails.js

+6-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import _ from 'lodash'
22
import React, { PropTypes as PT, Component } from 'react'
33
import Sticky from 'react-stickynode'
44

5-
import config from '../../../config/projectWizard'
5+
import { findProduct } from '../../../config/projectWizard'
66
import './FillProjectDetails.scss'
77
import ProjectBasicDetailsForm from '../components/ProjectBasicDetailsForm'
88
import ProjectOutline from '../components/ProjectOutline'
@@ -33,22 +33,20 @@ class FillProjectDetails extends Component {
3333

3434
render() {
3535
const { project, dirtyProject, processing, submitBtnText } = this.props
36-
const product = _.get(project, 'details.products[0]')
37-
const projectTypeId = _.get(project, 'type')
38-
const subConfig = config[_.findKey(config, {id : projectTypeId})]
39-
const productName = _.findKey(subConfig.subtypes, {id : product})
36+
const productId = _.get(project, 'details.products[0]')
37+
const product = findProduct(productId)
4038

4139
let specification = 'topcoder.v1'
42-
if (product)
43-
specification = typeToSpecification[product]
40+
if (productId)
41+
specification = typeToSpecification[productId]
4442
let sections = require(`../../../config/projectQuestions/${specification}`).basicSections
4543
return (
4644
<div className="FillProjectDetailsWrapper">
4745
<div className="header headerFillProjectDetails">
4846
</div>
4947
<div className="FillProjectDetails">
5048
<div className="header">
51-
<h1>Let's setup your { productName } project</h1>
49+
<h1>{ _.get(product, 'formTitle', `Let's setup your ${ product.name } project`) }</h1>
5250
</div>
5351
<section className="two-col-content content">
5452
<div className="container">

0 commit comments

Comments
 (0)