diff --git a/pages/detail/event/[id].vue b/pages/detail/event/[id].vue index 178bac1..512b5c9 100644 --- a/pages/detail/event/[id].vue +++ b/pages/detail/event/[id].vue @@ -22,16 +22,16 @@ const { data, isLoading } = useQuery({ queryFn: () => endpoint({ params: { id } }), }); -const maxFunctionCount = 3; -const functionNames = computed(() => { +const maxChipCount = 3; +const chipNames = computed(() => { if (isLoading.value) return []; - const fNames = [...new Set(data.value?.relations.function?.map((f) => f.to.name))]; - if (fNames.length <= maxFunctionCount) return fNames; - const truncatedFunctionNames = [ - ...fNames.slice(0, maxFunctionCount), - t("DetailPage.andOthers", { count: fNames.length - maxFunctionCount }), + const fNames = [...new Set(data.value?.relations.place?.map((f) => f.to.name))]; + if (fNames.length <= maxChipCount) return fNames; + const truncatedChipNames = [ + ...fNames.slice(0, maxChipCount), + t("DetailPage.andOthers", { count: fNames.length - maxChipCount }), ]; - return truncatedFunctionNames; + return truncatedChipNames; }); const flattenedRelations = computed(() => { if (isLoading.value) return []; @@ -56,21 +56,26 @@ const flattenedRelations = computed(() => { {{ data?.first_name }} {{ data?.name }}