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 summary: Ref<Summary | null> = ref(null);
|
||||||
const error = 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 = () => {
|
const fetchData = () => {
|
||||||
summary.value = null;
|
summary.value = null;
|
||||||
error.value = null;
|
error.value = null;
|
||||||
|
|
@ -66,5 +74,6 @@ export const useMentorCockpit = (
|
||||||
isLoading,
|
isLoading,
|
||||||
summary,
|
summary,
|
||||||
error,
|
error,
|
||||||
|
getCircleTitleById,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue