Enhance ApiStatusIndicator to conditionally render for aws-admin accounts only. Improve error handling in API response management across various components, ensuring expected 400 responses are logged appropriately. Update Credits and ApiMonitor components to handle null values gracefully and implement CRUD operations for planner and writer endpoints.
This commit is contained in:
@@ -52,7 +52,7 @@ export default function Credits() {
|
||||
<h3 className="text-sm font-medium text-gray-600 dark:text-gray-400">Current Balance</h3>
|
||||
</div>
|
||||
<div className="text-3xl font-bold text-gray-900 dark:text-white">
|
||||
{balance.credits.toLocaleString()}
|
||||
{(balance.credits ?? 0).toLocaleString()}
|
||||
</div>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 mt-2">Available credits</p>
|
||||
</Card>
|
||||
@@ -62,7 +62,7 @@ export default function Credits() {
|
||||
<h3 className="text-sm font-medium text-gray-600 dark:text-gray-400">Monthly Allocation</h3>
|
||||
</div>
|
||||
<div className="text-3xl font-bold text-gray-900 dark:text-white">
|
||||
{balance.plan_credits_per_month.toLocaleString()}
|
||||
{(balance.plan_credits_per_month ?? 0).toLocaleString()}
|
||||
</div>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 mt-2">Credits per month</p>
|
||||
</Card>
|
||||
@@ -72,7 +72,7 @@ export default function Credits() {
|
||||
<h3 className="text-sm font-medium text-gray-600 dark:text-gray-400">Used This Month</h3>
|
||||
</div>
|
||||
<div className="text-3xl font-bold text-gray-900 dark:text-white">
|
||||
{balance.credits_used_this_month.toLocaleString()}
|
||||
{(balance.credits_used_this_month ?? 0).toLocaleString()}
|
||||
</div>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 mt-2">Credits consumed</p>
|
||||
</Card>
|
||||
@@ -82,7 +82,7 @@ export default function Credits() {
|
||||
<h3 className="text-sm font-medium text-gray-600 dark:text-gray-400">Remaining</h3>
|
||||
</div>
|
||||
<div className="text-3xl font-bold text-gray-900 dark:text-white">
|
||||
{balance.credits_remaining.toLocaleString()}
|
||||
{(balance.credits_remaining ?? 0).toLocaleString()}
|
||||
</div>
|
||||
<p className="text-sm text-gray-500 dark:text-gray-400 mt-2">Credits remaining</p>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user