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() {
|
componentWillMount() {
|
||||||
const { appActions } = this.props;
|
const { appActions } = this.props;
|
||||||
appActions.setTitle('Hikes');
|
appActions.setTitle('Videos');
|
||||||
},
|
},
|
||||||
|
|
||||||
renderMap(hikes) {
|
renderMap(hikes) {
|
||||||
|
@ -314,8 +314,8 @@ export default Actions({
|
|||||||
location: {
|
location: {
|
||||||
action: 'PUSH',
|
action: 'PUSH',
|
||||||
pathname: currentHike && currentHike.dashedName ?
|
pathname: currentHike && currentHike.dashedName ?
|
||||||
`/hikes/${ currentHike.dashedName }` :
|
`/videos/${ currentHike.dashedName }` :
|
||||||
'/hikes'
|
'/videos'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import Hike from './components/Hike.jsx';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
path: 'hikes',
|
path: 'videos',
|
||||||
component: Hikes,
|
component: Hikes,
|
||||||
childRoutes: [{
|
childRoutes: [{
|
||||||
path: ':dashedName',
|
path: ':dashedName',
|
||||||
|
@ -15,8 +15,8 @@ const debug = debugFactory('freecc:react-server');
|
|||||||
const routes = [
|
const routes = [
|
||||||
'/jobs',
|
'/jobs',
|
||||||
'/jobs/*',
|
'/jobs/*',
|
||||||
'/hikes',
|
'/videos',
|
||||||
'/hikes/*'
|
'/videos/*'
|
||||||
];
|
];
|
||||||
|
|
||||||
const devRoutes = [];
|
const devRoutes = [];
|
||||||
|
@ -223,6 +223,15 @@ function getSuperBlocks$(challenge$, completedChallenges) {
|
|||||||
const isComingSoon = _.every(blockArray, 'isComingSoon');
|
const isComingSoon = _.every(blockArray, 'isComingSoon');
|
||||||
const isRequired = _.every(blockArray, 'isRequired');
|
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 {
|
return {
|
||||||
isBeta,
|
isBeta,
|
||||||
isComingSoon,
|
isComingSoon,
|
||||||
|
@ -31,12 +31,12 @@ block content
|
|||||||
for challenge in challengeBlock.challenges
|
for challenge in challengeBlock.challenges
|
||||||
if challenge.completed
|
if challenge.completed
|
||||||
p.challenge-title.faded.text-primary.ion-checkmark-circled.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")
|
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
|
= challenge.title
|
||||||
span.sr-only= " Complete"
|
span.sr-only= " Complete"
|
||||||
else if challenge.isRequired
|
else if challenge.isRequired
|
||||||
p.challenge-title.ion-ios-circle-outline.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")
|
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= challenge.title
|
||||||
span.sr-only= " Incomplete"
|
span.sr-only= " Incomplete"
|
||||||
if challenge.markNew
|
if challenge.markNew
|
||||||
@ -51,7 +51,7 @@ block content
|
|||||||
strong *
|
strong *
|
||||||
else
|
else
|
||||||
p.challenge-title.ion-ios-circle-outline.padded-ionic-icon.negative-15(name="#{challenge.dashedName}")
|
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= challenge.title
|
||||||
span.sr-only= " Incomplete"
|
span.sr-only= " Incomplete"
|
||||||
if challenge.markNew
|
if challenge.markNew
|
||||||
|
Reference in New Issue
Block a user