Skip to content

Commit 0564d15

Browse files
committed
Update NewAppHeader.vue
1 parent f353a34 commit 0564d15

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

components/layout/NewAppHeader.vue

+18-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
v-for="link in links"
1212
:key="link.name"
1313
:href="link.path"
14-
:class="{ active: link.active }">
14+
:class="{ active: checkActive(link.name) }">
1515
{{ link.name }}
1616
</a>
1717
</nav>
@@ -24,6 +24,7 @@
2424
</template>
2525

2626
<script>
27+
import {mapGetters} from 'vuex';
2728
import OpenElectricityLogo from '../ui/OpenElectricityLogo.vue';
2829
import BurgerButton from './BurgerButton.vue';
2930
@@ -35,7 +36,7 @@ const topLevelLinks = [
3536
},
3637
{
3738
name: 'Facilities Map',
38-
path: '/facilities/nem'
39+
path: '/facilities/nem/?status=operating'
3940
},
4041
{
4142
name: 'Future Scenarios',
@@ -69,6 +70,10 @@ export default {
6970
},
7071
7172
computed: {
73+
...mapGetters({
74+
isEnergyView: 'isEnergyView',
75+
isFacilitiesView: 'isFacilitiesView'
76+
}),
7277
mobileNavActive: {
7378
get() {
7479
return this.$store.state.app.mobileNavActive;
@@ -77,6 +82,17 @@ export default {
7782
this.$store.commit('app/mobileNavActive', value);
7883
}
7984
}
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+
}
8096
}
8197
}
8298
</script>

0 commit comments

Comments
 (0)