forked from CSGOWTF/csgowtf
fixed title showing internal bsp name instead of actual map name + added reset-mutations to store
This commit is contained in:
@@ -90,6 +90,7 @@ import axios from 'axios'
|
||||
import {DisplayRank, FormatFullDate, GetAvgRank, GoToLink, LoadImage} from "../utils";
|
||||
import {useStore} from "vuex";
|
||||
import {useRoute} from 'vue-router'
|
||||
import {MAPNAMES} from "../constants";
|
||||
|
||||
export default {
|
||||
name: 'Match',
|
||||
@@ -102,7 +103,7 @@ export default {
|
||||
|
||||
// Refs
|
||||
const data = reactive({
|
||||
playerName: '',
|
||||
player_id: '',
|
||||
matchDetails: {},
|
||||
stats: [],
|
||||
score: [0],
|
||||
@@ -116,7 +117,7 @@ export default {
|
||||
.get(`${process.env.VUE_APP_API_URL}/match/${props.match_id}`)
|
||||
.then((response) => {
|
||||
if (response.data.map)
|
||||
document.title = `${response.data.map} | csgoWTF`
|
||||
document.title = `${MAPNAMES[response.data.map]} | csgoWTF`
|
||||
else
|
||||
document.title = `Match-Details | csgoWTF`
|
||||
|
||||
@@ -177,10 +178,7 @@ export default {
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
store.commit({
|
||||
type: 'changeMatchDetails',
|
||||
data: {}
|
||||
})
|
||||
store.commit('resetMatchDetails')
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user