fix: adds circle title
This commit is contained in:
parent
bad9ed1926
commit
c7e457d138
|
|
@ -44,6 +44,14 @@ export const useMentorCockpit = (
|
|||
const summary: Ref<Summary | null> = 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,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue