worked on video challenge superblock
fixed rebase merge errors Fix videos route Fix hikes broken true/false fixed component name
This commit is contained in:
@ -37,7 +37,7 @@ export default contain(
|
||||
|
||||
componentWillMount() {
|
||||
const { appActions } = this.props;
|
||||
appActions.setTitle('Hikes');
|
||||
appActions.setTitle('Videos');
|
||||
},
|
||||
|
||||
renderMap(hikes) {
|
||||
|
@ -314,8 +314,8 @@ export default Actions({
|
||||
location: {
|
||||
action: 'PUSH',
|
||||
pathname: currentHike && currentHike.dashedName ?
|
||||
`/hikes/${ currentHike.dashedName }` :
|
||||
'/hikes'
|
||||
`/videos/${ currentHike.dashedName }` :
|
||||
'/videos'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import Hike from './components/Hike.jsx';
|
||||
*/
|
||||
|
||||
export default {
|
||||
path: 'hikes',
|
||||
path: 'videos',
|
||||
component: Hikes,
|
||||
childRoutes: [{
|
||||
path: ':dashedName',
|
||||
|
@ -15,8 +15,8 @@ const debug = debugFactory('freecc:react-server');
|
||||
const routes = [
|
||||
'/jobs',
|
||||
'/jobs/*',
|
||||
'/hikes',
|
||||
'/hikes/*'
|
||||
'/videos',
|
||||
'/videos/*'
|
||||
];
|
||||
|
||||
const devRoutes = [];
|
||||
|
@ -223,6 +223,15 @@ function getSuperBlocks$(challenge$, completedChallenges) {
|
||||
const isComingSoon = _.every(blockArray, 'isComingSoon');
|
||||
const isRequired = _.every(blockArray, 'isRequired');
|
||||
|
||||
blockArray = blockArray.map(challenge => {
|
||||
if (challenge.challengeType == 6 && challenge.type === 'hike') {
|
||||
challenge.url = '/videos/' + challenge.dashedName;
|
||||
} else {
|
||||
challenge.url = '/challenges/' + challenge.dashedName;
|
||||
}
|
||||
return challenge;
|
||||
});
|
||||
|
||||
return {
|
||||
isBeta,
|
||||
isComingSoon,
|
||||
|
@ -31,12 +31,12 @@ block content
|
||||
for challenge in challengeBlock.challenges
|
||||
if challenge.completed
|
||||
p.challenge-title.faded.text-primary.ion-checkmark-circled.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")
|
||||
a(href="/challenges/#{challenge.dashedName}" target='_parent')
|
||||
a(href="#{challenge.url}" target='_parent')
|
||||
= challenge.title
|
||||
span.sr-only= " Complete"
|
||||
else if challenge.isRequired
|
||||
p.challenge-title.ion-ios-circle-outline.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")
|
||||
a(name="#{challenge.dashedName}" target='_parent' href="/challenges/#{challenge.dashedName}" class=challenge.isComingSoon ? 'disabled' : '')
|
||||
a(name="#{challenge.dashedName}" target='_parent' href="#{challenge.url}" class=challenge.isComingSoon ? 'disabled' : '')
|
||||
span= challenge.title
|
||||
span.sr-only= " Incomplete"
|
||||
if challenge.markNew
|
||||
@ -51,7 +51,7 @@ block content
|
||||
strong *
|
||||
else
|
||||
p.challenge-title.ion-ios-circle-outline.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")
|
||||
a(name="#{challenge.dashedName}" target='_parent' href="/challenges/#{challenge.dashedName}" class=challenge.isComingSoon ? 'disabled' : '')
|
||||
a(name="#{challenge.dashedName}" target='_parent' href="#{challenge.url}" class=challenge.isComingSoon ? 'disabled' : '')
|
||||
span= challenge.title
|
||||
span.sr-only= " Incomplete"
|
||||
if challenge.markNew
|
||||
|
Reference in New Issue
Block a user