Преглед изворни кода

style: rename signin to signIn

nian пре 2 месеци
родитељ
комит
73bafb76ca
3 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      src/router/guard.ts
  2. 1 1
      src/router/index.ts
  3. 1 1
      src/stores/user.ts

+ 1 - 1
src/router/guard.ts

@@ -20,7 +20,7 @@ export function setupRouterGuard(router: Router) {
 
     const userStore = useUserStore()
 
-    if (to.name === 'signin') {
+    if (to.name === 'signIn') {
       if (!userStore.token) {
         next()
       } else {

+ 1 - 1
src/router/index.ts

@@ -5,7 +5,7 @@ import { setupRouterGuard } from './guard'
 import type { RouteRecordRaw } from 'vue-router'
 
 const routes: RouteRecordRaw[] = [
-  { path: '/sign-in', name: 'signin', component: () => import('@/views/sign-in/index.vue') },
+  { path: '/sign-in', name: 'signIn', component: () => import('@/views/sign-in/index.vue') },
   {
     name: 'errorPage',
     path: '/:pathMatch(.*)*',

+ 1 - 1
src/stores/user.ts

@@ -56,7 +56,7 @@ export const useUserStore = defineStore('userStore', () => {
 
   function cleanup(redirectPath?: string) {
     router.replace({
-      name: 'signin',
+      name: 'signIn',
       ...(redirectPath ? { query: { r: redirectPath } } : {}),
     })