1
0
mirror of https://github.com/hyperspacedev/hyperspace synced 2025-02-03 18:57:38 +01:00

Add emojis to bios

This commit is contained in:
Marquis Kurt 2019-09-23 14:18:54 -04:00
parent b7e9c213e6
commit 2e2a11360c
No known key found for this signature in database
GPG Key ID: 725636D259F5402D
2 changed files with 16 additions and 6 deletions

View File

@ -154,8 +154,19 @@ export const styles = (theme: Theme) =>
backgroundColor: theme.palette.primary.main
},
pageProfileNameEmoji: {
height: theme.typography.h4.fontSize,
fontWeight: theme.typography.fontWeightMedium
minHeight: theme.typography.h4.fontSize,
fontWeight: theme.typography.fontWeightMedium,
'& img': {
height: theme.typography.h4.fontSize,
}
},
pageProfileBioEmoji: {
height: '0.875rem',
'& img': {
height: '0.875rem',
paddingLeft: 4,
paddingRight: 4,
}
},
pageProfileStatsDiv: {
display: "inline-flex",

View File

@ -432,12 +432,11 @@ class ProfilePage extends Component<any, IProfilePageState> {
? "@" + this.state.account.acct
: ""}
</Typography>
<Typography paragraph color="inherit">
{this.state.account
<Typography paragraph color="inherit" dangerouslySetInnerHTML={{ __html: this.state.account
? this.state.account.note
? this.state.account.note
? emojifyString(this.state.account.note, this.state.account.emojis, classes.pageProfileBioEmoji)
: "No bio provided by user."
: "No bio available."}
: "No bio available."}}>
</Typography>
<Typography color={"inherit"}>
{this.state.account