summaryrefslogtreecommitdiff
path: root/makima/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'makima/frontend')
-rw-r--r--makima/frontend/src/components/chains/ChainEditor.tsx10
-rw-r--r--makima/frontend/src/lib/api.ts5
-rw-r--r--makima/frontend/src/routes/chains.tsx2
3 files changed, 8 insertions, 9 deletions
diff --git a/makima/frontend/src/components/chains/ChainEditor.tsx b/makima/frontend/src/components/chains/ChainEditor.tsx
index 92bd496..0dcabe1 100644
--- a/makima/frontend/src/components/chains/ChainEditor.tsx
+++ b/makima/frontend/src/components/chains/ChainEditor.tsx
@@ -114,19 +114,19 @@ export function ChainEditor({
Back
</button>
<div>
- <h2 className="font-mono text-sm text-[#dbe7ff]">{chain.chain.name}</h2>
- {chain.chain.description && (
- <p className="font-mono text-xs text-[#8b949e]">{chain.chain.description}</p>
+ <h2 className="font-mono text-sm text-[#dbe7ff]">{chain.name}</h2>
+ {chain.description && (
+ <p className="font-mono text-xs text-[#8b949e]">{chain.description}</p>
)}
</div>
</div>
<div className="flex items-center gap-2">
<span
className={`font-mono text-[10px] uppercase ${
- statusColors[chain.chain.status] || "text-[#555]"
+ statusColors[chain.status] || "text-[#555]"
}`}
>
- {chain.chain.status}
+ {chain.status}
</span>
<button
onClick={onRefresh}
diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts
index 445537c..56491fd 100644
--- a/makima/frontend/src/lib/api.ts
+++ b/makima/frontend/src/lib/api.ts
@@ -3004,9 +3004,8 @@ export interface ChainContractDetail {
createdAt: string;
}
-/** Chain with contracts */
-export interface ChainWithContracts {
- chain: Chain;
+/** Chain with contracts (chain fields are flattened via serde(flatten)) */
+export interface ChainWithContracts extends Chain {
contracts: ChainContractDetail[];
}
diff --git a/makima/frontend/src/routes/chains.tsx b/makima/frontend/src/routes/chains.tsx
index f01d5a6..23484b4 100644
--- a/makima/frontend/src/routes/chains.tsx
+++ b/makima/frontend/src/routes/chains.tsx
@@ -102,7 +102,7 @@ function ChainsPageContent() {
const result = await createNewChain(data);
if (result) {
setIsCreating(false);
- navigate(`/chains/${result.chain.id}`);
+ navigate(`/chains/${result.id}`);
}
} catch (err) {
console.error("Failed to create chain:", err);