Revert "Represent DB avatar URLs as non-null (#128)"
This reverts commit bf8e09b6c1
.
This commit is contained in:
parent
87b43e6bdb
commit
4de0fcd198
|
@ -9,7 +9,7 @@ export type Answer = {
|
||||||
userId: string
|
userId: string
|
||||||
username: string
|
username: string
|
||||||
name: string
|
name: string
|
||||||
avatarUrl: string
|
avatarUrl?: string
|
||||||
|
|
||||||
text: string
|
text: string
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,5 +13,5 @@ export type Comment = {
|
||||||
// Denormalized, for rendering comments
|
// Denormalized, for rendering comments
|
||||||
userName: string
|
userName: string
|
||||||
userUsername: string
|
userUsername: string
|
||||||
userAvatarUrl: string
|
userAvatarUrl?: string
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ export type FullContract<
|
||||||
creatorId: string
|
creatorId: string
|
||||||
creatorName: string
|
creatorName: string
|
||||||
creatorUsername: string
|
creatorUsername: string
|
||||||
creatorAvatarUrl: string
|
creatorAvatarUrl?: string // Start requiring after 2022-03-01
|
||||||
|
|
||||||
question: string
|
question: string
|
||||||
description: string // More info about what the contract is about
|
description: string // More info about what the contract is about
|
||||||
|
|
|
@ -4,7 +4,7 @@ export type User = {
|
||||||
|
|
||||||
name: string
|
name: string
|
||||||
username: string
|
username: string
|
||||||
avatarUrl: string
|
avatarUrl?: string
|
||||||
|
|
||||||
// For their user page
|
// For their user page
|
||||||
bio?: string
|
bio?: string
|
||||||
|
|
|
@ -6,7 +6,7 @@ export type OgCardProps = {
|
||||||
metadata: string
|
metadata: string
|
||||||
creatorName: string
|
creatorName: string
|
||||||
creatorUsername: string
|
creatorUsername: string
|
||||||
creatorAvatarUrl: string
|
creatorAvatarUrl?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildCardUrl(props: OgCardProps) {
|
function buildCardUrl(props: OgCardProps) {
|
||||||
|
@ -14,6 +14,11 @@ function buildCardUrl(props: OgCardProps) {
|
||||||
props.probability === undefined
|
props.probability === undefined
|
||||||
? ''
|
? ''
|
||||||
: `&probability=${encodeURIComponent(props.probability ?? '')}`
|
: `&probability=${encodeURIComponent(props.probability ?? '')}`
|
||||||
|
const creatorAvatarUrlParam =
|
||||||
|
props.creatorAvatarUrl === undefined
|
||||||
|
? ''
|
||||||
|
: `&creatorAvatarUrl=${encodeURIComponent(props.creatorAvatarUrl ?? '')}`
|
||||||
|
|
||||||
// URL encode each of the props, then add them as query params
|
// URL encode each of the props, then add them as query params
|
||||||
return (
|
return (
|
||||||
`https://manifold-og-image.vercel.app/m.png` +
|
`https://manifold-og-image.vercel.app/m.png` +
|
||||||
|
@ -21,7 +26,7 @@ function buildCardUrl(props: OgCardProps) {
|
||||||
probabilityParam +
|
probabilityParam +
|
||||||
`&metadata=${encodeURIComponent(props.metadata)}` +
|
`&metadata=${encodeURIComponent(props.metadata)}` +
|
||||||
`&creatorName=${encodeURIComponent(props.creatorName)}` +
|
`&creatorName=${encodeURIComponent(props.creatorName)}` +
|
||||||
`&creatorAvatarUrl=${encodeURIComponent(props.creatorAvatarUrl)}` +
|
creatorAvatarUrlParam +
|
||||||
`&creatorUsername=${encodeURIComponent(props.creatorUsername)}`
|
`&creatorUsername=${encodeURIComponent(props.creatorUsername)}`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ export type LiteMarket = {
|
||||||
creatorUsername: string
|
creatorUsername: string
|
||||||
creatorName: string
|
creatorName: string
|
||||||
createdTime: number
|
createdTime: number
|
||||||
creatorAvatarUrl: string
|
creatorAvatarUrl?: string
|
||||||
|
|
||||||
// Market attributes. All times are in milliseconds since epoch
|
// Market attributes. All times are in milliseconds since epoch
|
||||||
closeTime?: number
|
closeTime?: number
|
||||||
|
|
Loading…
Reference in New Issue
Block a user