From 674b59e0df28ee82ecd9f803e05e9894e7454b1b Mon Sep 17 00:00:00 2001 From: Laure Jablonski Date: Fri, 28 Feb 2025 13:41:20 +0100 Subject: [PATCH] chore : added comments for better code readability --- frontend/src/components/MenuBar.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/MenuBar.vue b/frontend/src/components/MenuBar.vue index 6f13ddff..75b7d7e0 100644 --- a/frontend/src/components/MenuBar.vue +++ b/frontend/src/components/MenuBar.vue @@ -5,15 +5,17 @@ const route = useRoute(); + // instantiate variables to use in html to render right + // links and content dependent on the role (student or teacher) const isTeacher = route.path.includes("teacher"); + const userId = computed(() => route.params.id as string); + const role = isTeacher ? "teacher" : "student"; - const name = "Kurt Cobain"; //TODO: naam opvragen + const name = "Kurt Cobain"; const initials = name .split(" ") .map((n) => n[0]) .join(""); - - const userId = computed(() => route.params.id as string);