Skip to content

Commit

Permalink
perf: added router composition to pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaile committed Oct 31, 2023
1 parent 4efa2a0 commit f34787f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/views/BaseTemplate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { faCircleUser } from '@fortawesome/free-solid-svg-icons/faCircleUser'
import { faAngleDown } from '@fortawesome/free-solid-svg-icons/faAngleDown'
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'
import { useAuth } from '@/composables/useAuth'
import router from '@/router'
import SidebarMenu from '@/components/SidebarMenu.vue'
import { useRouter } from 'vue-router'
const { logout, uid } = useAuth()
const router = useRouter()
function handleLogout() {
logout()
router.replace({ name: 'login' })
Expand Down
3 changes: 2 additions & 1 deletion src/views/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import {
} from '@nethserver/vue-tailwind-lib'
import { ref } from 'vue'
import { useAuth } from '@/composables/useAuth'
import router from '@/router'
import axios from 'axios'
import { useRouter } from 'vue-router'
const { login } = useAuth()
const router = useRouter()
const username = ref('')
const password = ref('')
Expand Down

0 comments on commit f34787f

Please sign in to comment.