feat: authState in plaats van localStorage
This commit is contained in:
parent
49f1a98eec
commit
9d8e364e3b
1 changed files with 4 additions and 1 deletions
|
@ -2,6 +2,9 @@
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
|
||||||
|
import auth from "@/services/auth/auth-service.ts";
|
||||||
|
|
||||||
|
|
||||||
// Import assets
|
// Import assets
|
||||||
import dwengoLogo from "../../../assets/img/dwengo-groen-zwart.svg";
|
import dwengoLogo from "../../../assets/img/dwengo-groen-zwart.svg";
|
||||||
|
|
||||||
|
@ -11,7 +14,7 @@
|
||||||
// Links and content dependent on the role (student or teacher)
|
// Links and content dependent on the role (student or teacher)
|
||||||
const path = "/user";
|
const path = "/user";
|
||||||
|
|
||||||
const role = localStorage.getItem("activeRole");
|
const role = auth.authState.activeRole;
|
||||||
|
|
||||||
//TODO: use authState form services map to get user token
|
//TODO: use authState form services map to get user token
|
||||||
const name = "Kurt Cobain";
|
const name = "Kurt Cobain";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue