diff --git a/frontend/src/routes/edit/member/[id]/+page.svelte b/frontend/src/routes/edit/member/[id]/+page.svelte index 8e18f1f..8dfa55c 100644 --- a/frontend/src/routes/edit/member/[id]/+page.svelte +++ b/frontend/src/routes/edit/member/[id]/+page.svelte @@ -252,6 +252,18 @@ } }; + let deleteModalPronoun = "the member's"; + $: deleteModalPronoun = updateModalPronoun(pronouns); + + const updateModalPronoun = (pronouns: Pronoun[]) => { + const filtered = pronouns.filter((entry) => entry.status === WordStatus.Favourite); + if (filtered.length < 1) return "the member's"; + + const split = filtered[0].pronouns.split("/"); + if (split.length !== 5) return "the member's"; + return split[2]; + }; + let deleteOpen = false; const toggleDeleteOpen = () => (deleteOpen = !deleteOpen); let deleteName = ""; @@ -285,7 +297,9 @@

- If you want to delete this member, type their name ({data.member.name}) below: + If you want to delete this member, type {deleteModalPronoun} name ({data.member.name}) below: