diff --git a/client/src/services/mentorCockpit.ts b/client/src/services/mentorCockpit.ts index 95371c58..569a3252 100644 --- a/client/src/services/mentorCockpit.ts +++ b/client/src/services/mentorCockpit.ts @@ -44,6 +44,14 @@ export const useMentorCockpit = ( const summary: Ref = ref(null); const error = ref(null); + const getCircleTitleById = (id: string): string => { + if (summary.value?.circles) { + const circle = summary.value.circles.find((circle) => String(circle.id) === id); + return circle ? circle.title : ""; + } + return ""; + }; + const fetchData = () => { summary.value = null; error.value = null; @@ -66,5 +74,6 @@ export const useMentorCockpit = ( isLoading, summary, error, + getCircleTitleById, }; };