fixed match-route over-complication

This commit is contained in:
2022-02-03 13:36:36 +01:00
parent 378a5f807c
commit 2b4b0d082c
3 changed files with 11 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ const routes = [
}, },
{ {
path: '/privacy-policy', path: '/privacy-policy',
name: '{PrivacyPolicy}', name: 'PrivacyPolicy',
components: { components: {
main: lazyLoadView('PrivacyPolicy') main: lazyLoadView('PrivacyPolicy')
} }
@@ -51,7 +51,7 @@ const routes = [
props: true, props: true,
children: [ children: [
{ {
path: 'overview', path: '',
components: { components: {
score: lazyLoadComponent('ScoreTeam') score: lazyLoadComponent('ScoreTeam')
} }

View File

@@ -97,7 +97,7 @@
<ul class="list-unstyled d-flex m-auto"> <ul class="list-unstyled d-flex m-auto">
<li :title="!data.matchDetails.parsed ? 'This demo has not been parsed' : ''" <li :title="!data.matchDetails.parsed ? 'This demo has not been parsed' : ''"
class="list-item nav-item"> class="list-item nav-item">
<router-link :to="'/match/' + data.matchDetails.match_id + '/overview'" class="nav-link" <router-link :to="'/match/' + data.matchDetails.match_id" class="nav-link"
replace>Scoreboard replace>Scoreboard
</router-link> </router-link>
</li> </li>
@@ -253,9 +253,9 @@ export default {
else { else {
errorHandling(404) errorHandling(404)
} }
} else if (route.fullPath.split('/')[3] === undefined) { } else {
if (matchIdPattern.test(props.match_id)) if (matchIdPattern.test(props.match_id))
GoToLink(`/match/${props.match_id}/overview`) GoToLink(`/match/${props.match_id}`)
else { else {
errorHandling(404) errorHandling(404)
} }
@@ -333,6 +333,7 @@ export default {
onMounted(() => { onMounted(() => {
checkRoute() checkRoute()
const headHeight = 230 const headHeight = 230
const navHeight = 42 const navHeight = 42

View File

@@ -243,8 +243,13 @@
</template> </template>
<script> <script>
import {setTitle} from "@/utils";
export default { export default {
name: "PrivacyPolicy", name: "PrivacyPolicy",
setup() {
setTitle('Privacy Policy')
}
} }
</script> </script>