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

Commit 873f084

Browse files
authored
Merge pull request #248 from aibtcdev/ultimate-css-fixups-2
Ultimate css fixups 2
2 parents 34edd95 + 7383033 commit 873f084

14 files changed

Lines changed: 927 additions & 526 deletions
771 KB
Loading

src/app/chat/metadata.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/app/daos/[id]/page.tsx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
fetchMarketStats,
1212
fetchTreasuryTokens,
1313
fetchTokenPrice,
14+
fetchHolders,
1415
} from "@/queries/daoQueries";
1516

1617
export const runtime = "edge";
@@ -50,6 +51,14 @@ export default function DAOPage() {
5051
enabled: !!dex,
5152
});
5253

54+
// Fetch holders data directly from Hiro API
55+
const { data: holdersData, isLoading: isLoadingHolders } = useQuery({
56+
queryKey: ["holders", token?.contract_principal, token?.symbol],
57+
queryFn: () => fetchHolders(token!.contract_principal, token!.symbol),
58+
enabled: !!token?.contract_principal && !!token?.symbol,
59+
staleTime: 600000, // 10 minutes
60+
});
61+
5362
const { data: marketStats, isLoading: isLoadingMarketStats } = useQuery({
5463
queryKey: [
5564
"marketStats",
@@ -83,7 +92,8 @@ export default function DAOPage() {
8392
isLoadingExtensions ||
8493
isLoadingTokenPrice ||
8594
isLoadingMarketStats ||
86-
isLoadingTreasuryTokens;
95+
isLoadingTreasuryTokens ||
96+
isLoadingHolders;
8797

8898
if (isLoading) {
8999
return (
@@ -120,12 +130,28 @@ export default function DAOPage() {
120130
);
121131
}
122132

133+
// Create an enhanced marketStats object that uses the holders count from Hiro API
134+
const enhancedMarketStats = marketStats
135+
? {
136+
...marketStats,
137+
// Prioritize holders count from Hiro API, fall back to marketStats
138+
holderCount: holdersData?.holderCount || marketStats.holderCount,
139+
}
140+
: {
141+
price: tokenPrice?.price || 0,
142+
marketCap: tokenPrice?.marketCap || 0,
143+
treasuryBalance: token?.max_supply
144+
? token.max_supply * 0.8 * (tokenPrice?.price || 0)
145+
: 0,
146+
holderCount: holdersData?.holderCount || 0,
147+
};
148+
123149
return (
124150
<div className="max-w-[1400px] mx-auto space-y-6 h-full">
125151
<DAOOverview
126152
dao={dao}
127153
token={token}
128-
marketStats={marketStats}
154+
marketStats={enhancedMarketStats}
129155
treasuryTokens={treasuryTokens}
130156
/>
131157
</div>

src/app/daos/layout.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Metadata } from "next";
2+
import React from "react";
3+
4+
export const metadata: Metadata = {
5+
title: "DAOs",
6+
description: "Bitcoin-backed DAOs. Fully autonomous governance.",
7+
};
8+
9+
export default function ChatLayout({
10+
children,
11+
}: {
12+
children: React.ReactNode;
13+
}) {
14+
return <div className="flex-1 flex flex-col">{children}</div>;
15+
}

src/app/daos/page.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
21
import React from "react";
32
import DAOs from "@/components/daos/daos";
4-
import { Metadata } from "next";
5-
6-
export const metadata: Metadata = {
7-
title: "DAOs",
8-
};
93

104
const page = () => {
115
return <DAOs />;

src/app/layout.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const viewport: Viewport = {
1111
};
1212

1313
export const metadata: Metadata = {
14-
metadataBase: new URL("https://app.aibtc.dev"),
14+
metadataBase: new URL("https://aibtc.com"),
1515
title: {
1616
default: "AIBTC",
1717
template: "%s | AIBTC",
@@ -27,7 +27,7 @@ export const metadata: Metadata = {
2727
type: "website",
2828
images: [
2929
{
30-
url: "https://app.aibtc.dev/logos/aibtcdev-avatar-1000px.png",
30+
url: "https://aibtc.com/logos/aibtcdev-avatar-1000px.png",
3131
width: 1000,
3232
height: 1000,
3333
alt: "AIBTC",
@@ -38,7 +38,7 @@ export const metadata: Metadata = {
3838
card: "summary_large_image",
3939
images: [
4040
{
41-
url: "https://app.aibtc.dev/logos/aibtcdev-pattern-1-with-text-social.png",
41+
url: "https://aibtc.com/logos/aibtcdev-pattern-1-with-text-social-new.png",
4242
alt: "AIBTC",
4343
width: 1200,
4444
height: 630,

src/components/daos/dao-buy-modal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
DialogDescription,
1212
} from "@/components/ui/dialog";
1313
import { Button } from "@/components/ui/button";
14-
import { MessageSquare, Info, Loader2 } from "lucide-react";
14+
import { Info, Loader2 } from "lucide-react";
1515
import { TokenBuyInput } from "./dao-buy-input";
1616
import AgentWalletSelector from "@/components/chat/agent-selector";
1717
import { useChatStore } from "@/store/chat";
@@ -168,7 +168,6 @@ export function DAOBuyModal({
168168
<DialogTrigger asChild>
169169
{trigger || (
170170
<Button variant="outline" className="gap-2">
171-
<MessageSquare className="h-4 w-4" />
172171
<span>Buy {tokenName}</span>
173172
</Button>
174173
)}
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Button } from "@/components/ui/button";
2-
import { MessageSquare } from "lucide-react";
32
import { DAOBuyModal } from "./dao-buy-modal";
43

54
interface DAOBuyTokenProps {
@@ -10,12 +9,7 @@ export function DAOBuyToken({ daoId }: DAOBuyTokenProps) {
109
return (
1110
<DAOBuyModal
1211
daoId={daoId}
13-
trigger={
14-
<Button variant="primary" size="sm" className="gap-1.5">
15-
<MessageSquare className="h-3.5 w-3.5" />
16-
<span className="text-xs">Buy</span>
17-
</Button>
18-
}
12+
trigger={<Button variant="primary">Buy</Button>}
1913
/>
2014
);
2115
}

0 commit comments

Comments
 (0)