Don't show creator avatar url, for now
This commit is contained in:
parent
e14970dc70
commit
f702e55214
|
@ -62,12 +62,11 @@ export function parseRequest(req: IncomingMessage) {
|
|||
|
||||
question:
|
||||
getString(question) || "Will you create a prediction market on Manifold?",
|
||||
probability: getString(probability) || "85",
|
||||
probability: getString(probability) || "85%",
|
||||
metadata: getString(metadata) || "Jan 1 • M$ 123 pool",
|
||||
creatorName: getString(creatorName) || "Manifold Markets",
|
||||
creatorUsername: getString(creatorUsername) || "ManifoldMarkets",
|
||||
creatorAvatarUrl:
|
||||
getString(creatorAvatarUrl) || "https://manifold.markets/logo.png",
|
||||
creatorAvatarUrl: getString(creatorAvatarUrl) || "",
|
||||
};
|
||||
parsedRequest.images = getDefaultImages(parsedRequest.images);
|
||||
return parsedRequest;
|
||||
|
|
|
@ -93,6 +93,7 @@ export function getHtml(parsedReq: ParsedRequest) {
|
|||
creatorUsername,
|
||||
creatorAvatarUrl,
|
||||
} = parsedReq;
|
||||
const hideAvatar = creatorAvatarUrl ? "" : "hidden";
|
||||
return `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
@ -110,11 +111,11 @@ export function getHtml(parsedReq: ParsedRequest) {
|
|||
<div class="absolute left-24 top-8">
|
||||
<div class="flex flex-row align-bottom gap-6">
|
||||
<img
|
||||
class="h-24 w-24 rounded-full bg-white flex items-center justify-center"
|
||||
class="h-24 w-24 rounded-full bg-white flex items-center justify-center ${hideAvatar}"
|
||||
src="${creatorAvatarUrl}"
|
||||
alt=""
|
||||
/>
|
||||
<div class="flex flex-col">
|
||||
<div class="flex flex-col gap-2">
|
||||
<p class="text-gray-900 text-3xl">${creatorName}</p>
|
||||
<p class="text-gray-500 text-3xl">@${creatorUsername}</p>
|
||||
</div>
|
||||
|
@ -139,7 +140,7 @@ export function getHtml(parsedReq: ParsedRequest) {
|
|||
</div>
|
||||
|
||||
<div class="flex flex-row justify-between gap-12 pt-36">
|
||||
<div class="text-indigo-700 text-6xl leading-snug">
|
||||
<div class="text-indigo-700 text-6xl leading-tight">
|
||||
${question}
|
||||
</div>
|
||||
<div class="flex flex-col text-primary">
|
||||
|
|
|
@ -6,7 +6,8 @@ export type OgCardProps = {
|
|||
metadata: string
|
||||
creatorName: string
|
||||
creatorUsername: string
|
||||
creatorAvatarUrl: string
|
||||
// TODO: Store creator avatar url in each contract, then enable this
|
||||
// creatorAvatarUrl: string
|
||||
}
|
||||
|
||||
function buildCardUrl(props: OgCardProps) {
|
||||
|
@ -17,8 +18,7 @@ function buildCardUrl(props: OgCardProps) {
|
|||
`&probability=${encodeURIComponent(props.probability)}` +
|
||||
`&metadata=${encodeURIComponent(props.metadata)}` +
|
||||
`&creatorName=${encodeURIComponent(props.creatorName)}` +
|
||||
`&creatorUsername=${encodeURIComponent(props.creatorUsername)}` +
|
||||
`&creatorAvatarUrl=${encodeURIComponent(props.creatorAvatarUrl)}`
|
||||
`&creatorUsername=${encodeURIComponent(props.creatorUsername)}`
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,6 @@ export default function ContractPage(props: {
|
|||
creatorName: contract.creatorName,
|
||||
creatorUsername: contract.creatorUsername,
|
||||
// TODO: replace with actual avatar url
|
||||
creatorAvatarUrl: `https://avatars.dicebear.com/v2/identicon/${contract.creatorUsername}.svg`,
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue
Block a user