Browse Source

correction path

Maha Bouchiba 2 years ago
parent
commit
c679872472
1 changed files with 6 additions and 6 deletions
  1. 6 6
      components/Layout/UI/Presentation.vue

+ 6 - 6
components/Layout/UI/Presentation.vue

@@ -119,11 +119,11 @@ const props = defineProps({
 const route = useRoute();
 
 const titleText = computed(() => {
-  if (/opentalent_artist/.test(route.path)) {
+  if (/^\/opentalent_artist\/?$/.test(route.path)) {
     return "Présentation d'Opentalent Artist";
-  } else if (/opentalent_school/.test(route.path)) {
+  } else if (/^\/opentalent_school\/?$/.test(route.path)) {
     return "Présentation d'Opentalent School";
-  } else if (/opentalent_manager/.test(route.path)) {
+  } else if (/^\/opentalent_manager\/?$/.test(route.path)) {
     return "Présentation d'Opentalent Manager";
   } else {
     return "Titre par défaut"; 
@@ -131,11 +131,11 @@ const titleText = computed(() => {
 });
 
 const iconColor = computed(() => {
-  if (/opentalent_artist/.test(route.path)) {
+  if (/^\/opentalent_artist\/?$/.test(route.path)) {
     return "#fac20a";
-  } else if (/opentalent_school/.test(route.path)) {
+  } else if (/^\/opentalent_school\/?$/.test(route.path)) {
     return "rgba(32, 147, 190, 0.6)";
-  } else if (/opentalent_manager/.test(route.path)) {
+  } else if (/^\/opentalent_manager\/?$/.test(route.path)) {
     return "#d8050b";
   } else {
     return "rgba(32, 147, 190, 0.6)";