File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 11
11
v-for =" link in links"
12
12
:key =" link.name"
13
13
:href =" link.path"
14
- :class =" { active: link.active }" >
14
+ :class =" { active: checkActive( link.name) }" >
15
15
{{ link.name }}
16
16
</a >
17
17
</nav >
24
24
</template >
25
25
26
26
<script >
27
+ import {mapGetters } from ' vuex' ;
27
28
import OpenElectricityLogo from ' ../ui/OpenElectricityLogo.vue' ;
28
29
import BurgerButton from ' ./BurgerButton.vue' ;
29
30
@@ -35,7 +36,7 @@ const topLevelLinks = [
35
36
},
36
37
{
37
38
name: ' Facilities Map' ,
38
- path: ' /facilities/nem'
39
+ path: ' /facilities/nem/?status=operating '
39
40
},
40
41
{
41
42
name: ' Future Scenarios' ,
@@ -69,6 +70,10 @@ export default {
69
70
},
70
71
71
72
computed: {
73
+ ... mapGetters ({
74
+ isEnergyView: ' isEnergyView' ,
75
+ isFacilitiesView: ' isFacilitiesView'
76
+ }),
72
77
mobileNavActive: {
73
78
get () {
74
79
return this .$store .state .app .mobileNavActive ;
@@ -77,6 +82,17 @@ export default {
77
82
this .$store .commit (' app/mobileNavActive' , value);
78
83
}
79
84
}
85
+ },
86
+
87
+ methods: {
88
+ checkActive (name ) {
89
+ if (this .isFacilitiesView && name === ' Facilities Map' ) {
90
+ return true ;
91
+ } else if (this .isEnergyView && name === ' Data Tracker' ) {
92
+ return true ;
93
+ }
94
+ return false
95
+ }
80
96
}
81
97
}
82
98
</script >
You can’t perform that action at this time.
0 commit comments