Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit c10bfa7

Browse files
authored
Merge pull request #699 from aibtcdev/twitter-preview
Twitter preview
2 parents e653071 + 170ea5d commit c10bfa7

3 files changed

Lines changed: 14 additions & 18 deletions

File tree

176 KB
Loading

src/app/aidaos/[name]/layout.tsx

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Metadata } from "next";
2-
import { supabase } from "@/utils/supabase/client";
2+
// import { supabase } from "@/utils/supabase/client";
33
import { fetchDAOByName } from "@/services/dao.service";
44
import { extractMission } from "@/utils/format";
55
import { DAOLayoutClient } from "./layout-client";
@@ -8,8 +8,8 @@ import { DAOLayoutClient } from "./layout-client";
88
// Minimum dimensions: 300x157
99
// Maximum dimensions: 4096x4096
1010
// Recommended dimensions: 1200x600
11-
const TWITTER_IMAGE_WIDTH = 1200;
12-
const TWITTER_IMAGE_HEIGHT = 600;
11+
// const TWITTER_IMAGE_WIDTH = 1200;
12+
// const TWITTER_IMAGE_HEIGHT = 600;
1313

1414
// Open Graph recommends 1.91:1 ratio
1515
const OG_IMAGE_WIDTH = 1200;
@@ -31,20 +31,16 @@ export async function generateMetadata({
3131
}
3232

3333
// Now fetch the token using the DAO ID
34-
const { data: token } = await supabase
35-
.from("tokens")
36-
.select("image_url")
37-
.eq("dao_id", dao.id)
38-
.single();
34+
// const { data: token } = await supabase
35+
// .from("tokens")
36+
// .select("image_url")
37+
// .eq("dao_id", dao.id)
38+
// .single();
3939

4040
// Generate separate URLs for Twitter and Open Graph with correct dimensions
41-
const twitterImageUrl = token?.image_url
42-
? `${token.image_url}?w=${TWITTER_IMAGE_WIDTH}&h=${TWITTER_IMAGE_HEIGHT}&fit=cover&auto=format`
43-
: undefined;
41+
const twitterImageUrl = "https://aibtc.com/logos/twitter-share-image.jpeg";
4442

45-
const ogImageUrl = token?.image_url
46-
? `${token.image_url}?w=${OG_IMAGE_WIDTH}&h=${OG_IMAGE_HEIGHT}&fit=cover&auto=format`
47-
: undefined;
43+
const ogImageUrl = "https://aibtc.com/logos/twitter-share-image.jpeg";
4844

4945
// Extract SEO-friendly shorter description using extractMission
5046
const seoDescription = extractMission(dao.description);

src/app/layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export const metadata: Metadata = {
2727
type: "website",
2828
images: [
2929
{
30-
url: "https://aibtc.com/logos/aibtcdev-avatar-1000px.png",
31-
width: 1000,
32-
height: 1000,
30+
url: "https://aibtc.com/logos/twitter-share-image.jpeg",
31+
width: 1200,
32+
height: 630,
3333
alt: "AIBTC",
3434
},
3535
],
@@ -41,7 +41,7 @@ export const metadata: Metadata = {
4141
"AI-powered agents. Bitcoin-backed DAOs. Fully autonomous governance.",
4242
images: [
4343
{
44-
url: "https://aibtc.com/logos/aibtcdev-pattern-1-with-text-social-new.png",
44+
url: "https://aibtc.com/logos/twitter-share-image.jpeg",
4545
alt: "AIBTC - AI Bitcoin Development Platform",
4646
width: 1200,
4747
height: 630,

0 commit comments

Comments
 (0)