Remove feed subicons; fix FeedBetGroup spacing
This commit is contained in:
parent
78c461b26c
commit
ed7902f77f
|
@ -40,12 +40,8 @@ import { Comment, mapCommentsByBetId } from '../lib/firebase/comments'
|
||||||
import { JoinSpans } from './join-spans'
|
import { JoinSpans } from './join-spans'
|
||||||
import Textarea from 'react-expanding-textarea'
|
import Textarea from 'react-expanding-textarea'
|
||||||
|
|
||||||
function AvatarWithIcon(props: {
|
function AvatarWithIcon(props: { username: string; avatarUrl: string }) {
|
||||||
username: string
|
const { username, avatarUrl } = props
|
||||||
avatarUrl: string
|
|
||||||
children: ReactChild
|
|
||||||
}) {
|
|
||||||
const { username, avatarUrl, children } = props
|
|
||||||
return (
|
return (
|
||||||
<SiteLink className="relative" href={`/${username}`}>
|
<SiteLink className="relative" href={`/${username}`}>
|
||||||
<img
|
<img
|
||||||
|
@ -53,10 +49,6 @@ function AvatarWithIcon(props: {
|
||||||
src={avatarUrl}
|
src={avatarUrl}
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span className="absolute -bottom-3 -right-2 bg-gray-50 rounded-tl px-0.5 py-px">
|
|
||||||
{children}
|
|
||||||
</span>
|
|
||||||
</SiteLink>
|
</SiteLink>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -70,9 +62,7 @@ function FeedComment(props: { activityItem: any }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AvatarWithIcon username={person.username} avatarUrl={person.avatarUrl}>
|
<AvatarWithIcon username={person.username} avatarUrl={person.avatarUrl} />
|
||||||
<ChatAltIcon className="h-5 w-5 text-gray-400" aria-hidden="true" />
|
|
||||||
</AvatarWithIcon>
|
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<div>
|
<div>
|
||||||
<p className="mt-0.5 text-sm text-gray-500">
|
<p className="mt-0.5 text-sm text-gray-500">
|
||||||
|
@ -263,9 +253,7 @@ function FeedQuestion(props: { contract: Contract }) {
|
||||||
<AvatarWithIcon
|
<AvatarWithIcon
|
||||||
username={contract.creatorUsername}
|
username={contract.creatorUsername}
|
||||||
avatarUrl={contract.creatorAvatarUrl}
|
avatarUrl={contract.creatorAvatarUrl}
|
||||||
>
|
/>
|
||||||
<StarIcon className="h-5 w-5 text-gray-500" aria-hidden="true" />
|
|
||||||
</AvatarWithIcon>
|
|
||||||
) : (
|
) : (
|
||||||
// TODO: After 2022-03-01, can just assume that all contracts have an avatarUrl
|
// TODO: After 2022-03-01, can just assume that all contracts have an avatarUrl
|
||||||
<div className="relative px-1">
|
<div className="relative px-1">
|
||||||
|
@ -531,12 +519,12 @@ function FeedBetGroup(props: { activityItem: any }) {
|
||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<div className="relative px-1">
|
<div className="relative px-1">
|
||||||
<div className="h-10 w-10 bg-gray-200 rounded-full ring-8 ring-gray-50 flex items-center justify-center">
|
<div className="h-8 w-8 bg-gray-200 rounded-full ring-8 ring-gray-50 flex items-center justify-center">
|
||||||
<UsersIcon className="h-6 w-6 text-gray-500" aria-hidden="true" />
|
<UsersIcon className="h-5 w-5 text-gray-500" aria-hidden="true" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="min-w-0 flex-1 py-1.5">
|
<div className="min-w-0 flex-1">
|
||||||
<div className="text-sm text-gray-500">
|
<div className="text-sm text-gray-500">
|
||||||
{yesBets.length > 0 && <BetGroupSpan outcome="YES" bets={yesBets} />}
|
{yesBets.length > 0 && <BetGroupSpan outcome="YES" bets={yesBets} />}
|
||||||
{yesBets.length > 0 && noBets.length > 0 && <br />}
|
{yesBets.length > 0 && noBets.length > 0 && <br />}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user