fix(web): alt names (#31987)
fix(web): alt names (#31980) (cherry picked from commit aecee4db94c33e05092c6e103bbfe4365046861a) Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
co-authored by
Jason Rasmussen
parent
3af49d9b4f
commit
112c5e190f
+5
-3
@@ -69,7 +69,9 @@
|
||||
|
||||
let numberOfAssets = $derived(data.statistics.assets);
|
||||
let person = $derived(data.person);
|
||||
const altItems = $derived(person.otherPeople.filter(({ name }) => !!name && name !== person.name));
|
||||
const altNames = $derived([
|
||||
...new Set(person.otherPeople.map(({ name }) => name).filter((name) => !!name && name !== person.name)),
|
||||
]);
|
||||
let thumbnailData = $derived(getPeopleThumbnailUrl(person));
|
||||
|
||||
let timelineManager = $state<TimelineManager>() as TimelineManager;
|
||||
@@ -400,10 +402,10 @@
|
||||
aria-label={$t('edit')}
|
||||
/>
|
||||
</div>
|
||||
{#if altItems.length > 0}
|
||||
{#if altNames.length > 0}
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">
|
||||
{$t('also_known_as')}
|
||||
{new Intl.ListFormat($locale).format(altItems.map(({ name }) => name))}
|
||||
{new Intl.ListFormat($locale).format(altNames)}
|
||||
</p>
|
||||
{/if}
|
||||
<p class="text-sm text-gray-500 dark:text-gray-400">
|
||||
|
||||
Reference in New Issue
Block a user