Skip to content

Commit

Permalink
fix: "deployment error"
Browse files Browse the repository at this point in the history
  • Loading branch information
gayatrigt committed Jan 20, 2025
1 parent 4e1c907 commit 32f6fe5
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions src/utils/generateMetadataForBountyFrame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Netname } from '@/utils/types';
import { Metadata } from 'next';
import prisma from 'prisma/prisma';

const appUrl = https://poidh.xyz;
const appUrl = 'https://poidh.xyz';

export const generateMetadataForBountyFrame = async ({
params,
Expand All @@ -28,21 +28,26 @@ export const generateMetadataForBountyFrame = async ({
const id = params.id;
const chain = chains[params.netname as keyof typeof chains];

const bounty = id !== 'null'
? await prisma.bounties.findFirst({
where: {
id: Number(id),
chain_id: chain.id,
},
})
: null;
const bounty =
id !== 'null'
? await prisma.bounties.findFirst({
where: {
id: Number(id),
chain_id: chain.id,
},
})
: null;

return {
title: bounty?.title || "poidh - pics or it didn't happen",
description: bounty?.description || "poidh - pics or it didn't happen - fully onchain bounties + collectible NFTs - start your collection today on Arbitrum, Base, or Degen Chain",
description:
bounty?.description ||
"poidh - pics or it didn't happen - fully onchain bounties + collectible NFTs - start your collection today on Arbitrum, Base, or Degen Chain",
openGraph: {
title: bounty?.title || "poidh - pics or it didn't happen",
description: bounty?.description || "poidh - pics or it didn't happen - fully onchain bounties + collectible NFTs - start your collection today on Arbitrum, Base, or Degen Chain",
description:
bounty?.description ||
"poidh - pics or it didn't happen - fully onchain bounties + collectible NFTs - start your collection today on Arbitrum, Base, or Degen Chain",
siteName: 'POIDH',
images: ['https://poidh.xyz/images/poidh-preview-hero.png'],
type: 'website',
Expand All @@ -51,7 +56,9 @@ export const generateMetadataForBountyFrame = async ({
twitter: {
card: 'summary_large_image',
title: bounty?.title || "poidh - pics or it didn't happen",
description: bounty?.description || "poidh - pics or it didn't happen - fully onchain bounties + collectible NFTs - start your collection today on Arbitrum, Base, or Degen Chain",
description:
bounty?.description ||
"poidh - pics or it didn't happen - fully onchain bounties + collectible NFTs - start your collection today on Arbitrum, Base, or Degen Chain",
images: ['https://poidh.xyz/images/poidh-preview-hero.png'],
},
other: {
Expand Down

0 comments on commit 32f6fe5

Please sign in to comment.