diff --git a/src/Components/MemberCard.js b/src/Components/MemberCard.js index 127ba649..130b3192 100644 --- a/src/Components/MemberCard.js +++ b/src/Components/MemberCard.js @@ -21,6 +21,7 @@ export default function MemberCard(props) { const [ birthday, setBirthday ] = useState(""); const [ birthdate, setBirthdate ] = useState(""); const [ pronouns, setPronouns ] = useState(""); + const [ editPronouns, setEditPronouns ] = useState(""); const [ avatar, setAvatar ] = useState(""); const [ color, setColor ] = useState(""); const [ desc, setDesc ] = useState(""); @@ -86,11 +87,15 @@ export default function MemberCard(props) { } if (member.pronouns) { - setPronouns(member.pronouns) - } else setPronouns('') + setPronouns(toHTML(member.pronouns)); + setEditPronouns(member.pronouns); + } else { setPronouns(''); + setEditPronouns(''); + } if (member.avatar_url) { - setAvatar(member.avatar_url.replace('?width=256&height=256&format=jpeg', '')) + var avatarsmall = member.avatar_url.replace('&format=jpeg', ''); + setAvatar(avatarsmall.replace('?width=256&height=256', '')) } else setAvatar('') if (member.color) { @@ -202,7 +207,7 @@ export default function MemberCard(props) { { member.avatar_url ? } className="avatar" modal> {close => (
close()}> - +
)}
: @@ -230,7 +235,7 @@ export default function MemberCard(props) { Pronouns: - + Avatar url: @@ -272,7 +277,8 @@ export default function MemberCard(props) { ID: {member.id} { member.display_name ? Display name: {displayName} : "" } { member.birthday ? Birthday: {birthday} : "" } - { member.pronouns ? Pronouns: {pronouns} : "" } + { member.pronouns ? localStorage.getItem('twemoji') ? Pronouns: : + Pronouns: : "" } { member.color ? Color: {color} : "" } { privacyView ? "" : proxyView ? "" : Privacy: setPrivacyView(true)}>View } { privacyView ? "" : proxyView ? "" : Proxy tags: setProxyView(true)}>View } @@ -284,49 +290,49 @@ export default function MemberCard(props) { Visibility: - + Name: - + Description: - + Avatar: - + Birthday: - + Pronouns: - + Meta: - + diff --git a/src/Components/ProfileCard.js b/src/Components/ProfileCard.js index abf7e39a..d9accbd6 100644 --- a/src/Components/ProfileCard.js +++ b/src/Components/ProfileCard.js @@ -48,11 +48,12 @@ export default function MemberCard(props) { } if (member.avatar_url) { - setAvatar(member.avatar_url.replace('?width=256&height=256&format=jpeg', '')) + var avatarsmall = member.avatar_url.replace('&format=jpeg', ''); + setAvatar(avatarsmall.replace('?width=256&height=256', '')) } else setAvatar('') if (member.pronouns) { - setPronouns(member.pronouns) + setPronouns(toHTML(member.pronouns)) } else setPronouns('') if (member.color) { @@ -71,7 +72,7 @@ export default function MemberCard(props) { { member.avatar_url ? } className="avatar" modal> {close => (
close()}> - +
)}
: @@ -83,7 +84,8 @@ export default function MemberCard(props) { ID: {member.id} { member.display_name ? Display name: {displayName} : "" } { member.birthday ? Birthday: {birthday} : "" } - { member.pronouns ? Pronouns: {pronouns} : "" } + { member.pronouns ? localStorage.getItem('twemoji') ? Pronouns: : + Pronouns: : "" } { member.color ? Color: {color} : "" } { proxyView ? "" : Proxy tags: setProxyView(true)}>View }