Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
Merge branch 'main' into app-perf
Browse files Browse the repository at this point in the history
  • Loading branch information
horacioh authored Mar 7, 2024
2 parents a56b65a + 4becd24 commit 6c3bd4a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
20 changes: 15 additions & 5 deletions frontend/apps/site/src/site-embeds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,21 @@ export function SiteInlineEmbed(props: InlineEmbedComponentProps) {
const accountQuery = trpc.account.get.useQuery({accountId})
const account = accountQuery.data?.account
return (
<Link href={`/a/${accountId}`} className="hm-link">
{(accountId &&
accountQuery.status == 'success' &&
`@${account?.profile?.alias}`) ||
`@${accountId?.slice(0, 5) + '...' + accountId?.slice(-5)}`}
<Link href={`/a/${accountId}`} style={{all: 'unset'}}>
<SizableText
textDecorationColor={'$mint11'}
color="$mint11"
className="hm-link"
fontSize="$5"
hoverStyle={{
cursor: 'pointer',
}}
>
{(accountId &&
accountQuery.status == 'success' &&
`@${account?.profile?.alias}`) ||
`@${accountId?.slice(0, 5) + '...' + accountId?.slice(-5)}`}
</SizableText>
</Link>
)
}
27 changes: 18 additions & 9 deletions frontend/packages/app/components/app-embeds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from '@mintter/shared'
import {
Button,
ButtonText,
SizableText,
Spinner,
UIAvatar,
Expand Down Expand Up @@ -265,21 +266,29 @@ export function AppInlineEmbed(props: InlineEmbedComponentProps) {
// </Button>

<Button
m={0}
p={0}
chromeless
className="hm-link"
bg="$backgroundTransparent"
hoverStyle={{
bg: '$backgroundTransparent',
}}
unstyled
onPress={() => navigate({key: 'account', accountId})}
style={{display: 'inline-block', lineHeight: 1, fontSize: '1em'}}
style={{
display: 'inline-block',
lineHeight: 1,
border: 'none',
}}
>
{(accountId &&
accountQuery.status == 'success' &&
`@${accountQuery.data?.profile?.alias}`) ||
`@${accountId?.slice(0, 5) + '...' + accountId?.slice(-5)}`}
<ButtonText
textDecorationColor={'$mint11'}
color="$mint11"
className="hm-link"
fontSize="$5"
>
{(accountId &&
accountQuery.status == 'success' &&
`@${accountQuery.data?.profile?.alias}`) ||
`@${accountId?.slice(0, 5) + '...' + accountId?.slice(-5)}`}
</ButtonText>
</Button>
)
}

0 comments on commit 6c3bd4a

Please sign in to comment.