Skip to content

Commit

Permalink
Merge pull request #953 from freefal/noHighlightOnTrainingRatingPress
Browse files Browse the repository at this point in the history
Make perfRatings with no seperate pages unclickable
  • Loading branch information
veloce committed Mar 27, 2019
2 parents 1eaba34 + 0422102 commit fa41636
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/ui/user/userView.tsx
Expand Up @@ -168,13 +168,15 @@ function renderPerf(key: PerfKey, name: string, perf: Perf, user: ProfileUser) {

const avail = variantPerfAvailable(key, perf)

return h('div', {
const props = {
className: 'profilePerf' + (avail ? ' nav' : ''),
'data-icon': gameIcon(key),
oncreate: helper.ontapY(() => {
if (hasNetwork() && avail) router.set(`/@/${user.id}/${key}/perf`)
})
}, [
oncreate: avail ? helper.ontapY(() => {
if (hasNetwork()) router.set(`/@/${user.id}/${key}/perf`)
}) : null
}

return h('div', props, [
h('span.name', name),
h('div.rating', [
perf.rating,
Expand Down

0 comments on commit fa41636

Please sign in to comment.