Store avatar url
This commit is contained in:
parent
2ce508382a
commit
6051d436b8
|
@ -45,6 +45,7 @@ export type Acceptance = {
|
||||||
userId: string
|
userId: string
|
||||||
userUsername: string
|
userUsername: string
|
||||||
userName: string
|
userName: string
|
||||||
|
userAvatarUrl: string
|
||||||
// The ID of the successful bet that tracks the money moved
|
// The ID of the successful bet that tracks the money moved
|
||||||
betId: string
|
betId: string
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,7 @@ export const acceptchallenge = newEndpoint({}, async (req, auth) => {
|
||||||
createdTime: Date.now(),
|
createdTime: Date.now(),
|
||||||
userUsername: user.username,
|
userUsername: user.username,
|
||||||
userName: user.name,
|
userName: user.name,
|
||||||
|
userAvatarUrl: user.avatarUrl,
|
||||||
} as Acceptance,
|
} as Acceptance,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
|
@ -54,6 +54,7 @@ function getMoreNavigation(user?: User | null) {
|
||||||
if (!user) {
|
if (!user) {
|
||||||
return [
|
return [
|
||||||
{ name: 'Leaderboards', href: '/leaderboards' },
|
{ name: 'Leaderboards', href: '/leaderboards' },
|
||||||
|
{ name: 'Challenges', href: '/challenges' },
|
||||||
{ name: 'Charity', href: '/charity' },
|
{ name: 'Charity', href: '/charity' },
|
||||||
{ name: 'Blog', href: 'https://news.manifold.markets' },
|
{ name: 'Blog', href: 'https://news.manifold.markets' },
|
||||||
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
|
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
|
||||||
|
@ -64,6 +65,7 @@ function getMoreNavigation(user?: User | null) {
|
||||||
return [
|
return [
|
||||||
{ name: 'Send M$', href: '/links' },
|
{ name: 'Send M$', href: '/links' },
|
||||||
{ name: 'Leaderboards', href: '/leaderboards' },
|
{ name: 'Leaderboards', href: '/leaderboards' },
|
||||||
|
{ name: 'Challenges', href: '/challenges' },
|
||||||
{ name: 'Charity', href: '/charity' },
|
{ name: 'Charity', href: '/charity' },
|
||||||
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
|
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
|
||||||
{ name: 'About', href: 'https://docs.manifold.markets/$how-to' },
|
{ name: 'About', href: 'https://docs.manifold.markets/$how-to' },
|
||||||
|
@ -114,6 +116,7 @@ function getMoreMobileNav() {
|
||||||
? []
|
? []
|
||||||
: [
|
: [
|
||||||
{ name: 'Send M$', href: '/links' },
|
{ name: 'Send M$', href: '/links' },
|
||||||
|
{ name: 'Challenges', href: '/challenges' },
|
||||||
{ name: 'Charity', href: '/charity' },
|
{ name: 'Charity', href: '/charity' },
|
||||||
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
|
{ name: 'Discord', href: 'https://discord.gg/eHQBNBqXuh' },
|
||||||
]),
|
]),
|
||||||
|
|
|
@ -24,6 +24,7 @@ import { ToastClipboard } from 'web/components/toast-clipboard'
|
||||||
import { Tabs } from 'web/components/layout/tabs'
|
import { Tabs } from 'web/components/layout/tabs'
|
||||||
import { SiteLink } from 'web/components/site-link'
|
import { SiteLink } from 'web/components/site-link'
|
||||||
import { UserLink } from 'web/components/user-page'
|
import { UserLink } from 'web/components/user-page'
|
||||||
|
import { Avatar } from 'web/components/avatar'
|
||||||
dayjs.extend(customParseFormat)
|
dayjs.extend(customParseFormat)
|
||||||
|
|
||||||
export function getManalinkUrl(slug: string) {
|
export function getManalinkUrl(slug: string) {
|
||||||
|
@ -271,7 +272,7 @@ function AllLinksTable(props: {
|
||||||
<thead className="bg-gray-50 text-left text-sm font-semibold text-gray-900">
|
<thead className="bg-gray-50 text-left text-sm font-semibold text-gray-900">
|
||||||
<tr>
|
<tr>
|
||||||
<th className="px-5 py-3.5">Amount</th>
|
<th className="px-5 py-3.5">Amount</th>
|
||||||
<th className="px-5 py-3.5">Link</th>
|
<th className="px-5 py-3.5">Challenge Link</th>
|
||||||
<th className="px-5 py-3.5">Accepted By</th>
|
<th className="px-5 py-3.5">Accepted By</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -305,7 +306,7 @@ function PublicLinkSummaryRow(props: { link: Challenge; highlight: boolean }) {
|
||||||
<td className="px-5 py-4 font-medium text-gray-900">
|
<td className="px-5 py-4 font-medium text-gray-900">
|
||||||
{formatMoney(link.amount)}
|
{formatMoney(link.amount)}
|
||||||
</td>
|
</td>
|
||||||
<td className="relative px-5 py-4">
|
<td className="relative px-2 py-4">
|
||||||
<SiteLink href={getChallengeUrl(link)}>
|
<SiteLink href={getChallengeUrl(link)}>
|
||||||
{getChallengeUrl(link)
|
{getChallengeUrl(link)
|
||||||
.replace('https://manifold.markets', '...')
|
.replace('https://manifold.markets', '...')
|
||||||
|
@ -313,11 +314,18 @@ function PublicLinkSummaryRow(props: { link: Challenge; highlight: boolean }) {
|
||||||
</SiteLink>
|
</SiteLink>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td className="px-5 py-4">
|
<td className="px-2 py-4">
|
||||||
<UserLink
|
<Row className={'items-center justify-start gap-1'}>
|
||||||
name={link.acceptances[0].userName}
|
<Avatar
|
||||||
username={link.acceptances[0].userUsername}
|
username={link.acceptances[0].userUsername}
|
||||||
/>
|
avatarUrl={link.acceptances[0].userAvatarUrl}
|
||||||
|
size={'sm'}
|
||||||
|
/>
|
||||||
|
<UserLink
|
||||||
|
name={link.acceptances[0].userName}
|
||||||
|
username={link.acceptances[0].userUsername}
|
||||||
|
/>
|
||||||
|
</Row>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user