Skip to content

Commit

Permalink
Merge pull request #269 from Mister-Hope/master
Browse files Browse the repository at this point in the history
fix: stop using vue-router
  • Loading branch information
kings1990 authored Aug 4, 2023
2 parents 42c97af + 9aba08a commit aa1dcba
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/.vuepress/layouts/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script setup lang="ts">
import { usePageData, usePageFrontmatter } from "@vuepress/client";
import { ref, watch } from "vue";
import { useRoute } from "vue-router";
import CommonWrapper from "@theme-hope/components/CommonWrapper";
import HomePage from "@theme-hope/components/HomePage";
Expand All @@ -13,7 +12,6 @@ import type { ThemePageFrontmatter } from "../../shared/index.js";
const page = usePageData();
const frontmatter = usePageFrontmatter<ThemePageFrontmatter>();
const route = useRoute();
const sidebarTopArray = [
`<a href="https://jetbrains.com" target="_blank">
Expand All @@ -37,9 +35,9 @@ function shuffle(arr) {
}
watch(
() => route.path,
() => page.value.path,
() => {
if (route.path.startsWith("/en/")) {
if (page.value.path.startsWith("/en/")) {
sidebarContent.value = "";
return;
Expand All @@ -56,7 +54,7 @@ ${sidebarTopArray.slice(0, 4).join("\n ")}
</span>
</div>
`;
},
}
);
</script>
<template>
Expand Down

0 comments on commit aa1dcba

Please sign in to comment.