feat: enhance dashboard and canvas components with credit management features
- Integrated CreditOverview and RecentTransactions components into the dashboard for better credit visibility. - Updated canvas toolbar to display current credit balance using CreditDisplay. - Improved AI image and prompt nodes to show credit costs and handle credit availability checks during image generation. - Added new queries for fetching recent transactions and monthly usage statistics to support dashboard features. - Refactored existing code to streamline credit-related functionalities across components.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { useRef } from "react";
|
||||
|
||||
import { CreditDisplay } from "@/components/canvas/credit-display";
|
||||
import { ExportButton } from "@/components/canvas/export-button";
|
||||
import { useCanvasPlacement } from "@/components/canvas/canvas-placement-context";
|
||||
|
||||
@@ -98,6 +99,7 @@ export default function CanvasToolbar({
|
||||
</button>
|
||||
))}
|
||||
<div className="ml-1 h-6 w-px bg-border" />
|
||||
<CreditDisplay />
|
||||
<ExportButton canvasName={canvasName ?? "canvas"} />
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user