Skip to content

Commit

Permalink
show twitter coverphoto (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
wraeth-eth authored Nov 22, 2023
1 parent 6e71121 commit 85e421b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pages/p/[projectId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
projectGetStaticPaths,
projectGetStaticProps,
} from '@/lib/backend/static/projects'
import { ipfsUriToGatewayUrl } from '@/lib/ipfs'
import { InferGetStaticPropsType } from 'next'

export const getStaticPaths = projectGetStaticPaths
Expand All @@ -23,6 +24,14 @@ export default function Page({
description={
metadata.description ? metadata.description.slice(0, 160) : ''
}
twitter={{
card: 'summary',
creator: metadata.twitter,
handle: metadata.twitter,
image: metadata.logoUri
? ipfsUriToGatewayUrl(metadata.logoUri)
: undefined,
}}
/>
<AppProvider projectId={pid} metadata={metadata}>
<Layout navbar="minimal" footer="minimal">
Expand Down

1 comment on commit 85e421b

@vercel
Copy link

@vercel vercel bot commented on 85e421b Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.