feat: todo in menubar toevoegen
This commit is contained in:
parent
d555144681
commit
37ecad30ea
2 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,8 @@
|
||||||
const path = "/user";
|
const path = "/user";
|
||||||
|
|
||||||
const role = localStorage.getItem("activeRole");
|
const role = localStorage.getItem("activeRole");
|
||||||
|
|
||||||
|
//TODO: use authState form services map to get user token
|
||||||
const name = "Kurt Cobain";
|
const name = "Kurt Cobain";
|
||||||
const initials = name
|
const initials = name
|
||||||
.split(" ")
|
.split(" ")
|
||||||
|
|
|
@ -109,7 +109,7 @@ const router = createRouter({
|
||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach(async (to, from, next) => {
|
router.beforeEach(async (to, from, next) => {
|
||||||
// Verify if user is logged in for paths that require access
|
// Verify if user is logged in for paths that require authentication
|
||||||
if (to.meta.requiresAuth) {
|
if (to.meta.requiresAuth) {
|
||||||
if (!authState.isLoggedIn) {
|
if (!authState.isLoggedIn) {
|
||||||
next("/login");
|
next("/login");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue