File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import { RouterLink , RouterView , useRouter } from ' vue-router' ;
3
3
import { waitForInitialSession } from ' ./lib/atproto/signed-in-user' ;
4
- import { ref , watch } from ' vue' ;
4
+ import { computed , ref , watch } from ' vue' ;
5
5
import { useVanillaCss } from ' ./lib/shared-globals' ;
6
6
import { frameworkStyles } from ' ./lib/framework-styles' ;
7
7
import UsePico from ' ./components/UsePico.vue' ;
8
+ import { watchImmediate } from ' @vueuse/core' ;
8
9
9
- const isInPage = ref < boolean >( );
10
+ const isInPage = computed (() => router . currentRoute . value . path . startsWith ( ' /page/ ' ) );
10
11
const router = useRouter ();
11
12
12
- watch (router .currentRoute , route => {
13
- isInPage .value = route .path .startsWith (' /page/' );
13
+ watchImmediate (router .currentRoute , () => {
14
14
useVanillaCss .value = true ;
15
15
});
16
16
You can’t perform that action at this time.
0 commit comments