diff --git a/app/(dashboard)/credits/page.tsx b/app/(dashboard)/credits/page.tsx
new file mode 100644
index 000000000..b3c1a9dcd
--- /dev/null
+++ b/app/(dashboard)/credits/page.tsx
@@ -0,0 +1,22 @@
+import { CreditDashboard } from '@/components/credits/credit-components';
+import { getUser, getTeamForUser } from '@/lib/db/queries';
+import { redirect } from 'next/navigation';
+
+export default async function CreditsPage() {
+ const user = await getUser();
+ if (!user) {
+ redirect('/sign-in');
+ }
+
+ const team = await getTeamForUser(user.id);
+ if (!team) {
+ throw new Error('Team not found');
+ }
+
+ return (
+
+
Credit Management
+
+
+ );
+}
diff --git a/app/(dashboard)/dashboard/page.tsx b/app/(dashboard)/dashboard/page.tsx
index 19e170a9d..182e93d69 100644
--- a/app/(dashboard)/dashboard/page.tsx
+++ b/app/(dashboard)/dashboard/page.tsx
@@ -1,8 +1,9 @@
import { redirect } from 'next/navigation';
import { Settings } from './settings';
import { getTeamForUser, getUser } from '@/lib/db/queries';
+import { CreditBalance } from '@/components/credits/credit-components';
-export default async function SettingsPage() {
+export default async function DashboardPage() {
const user = await getUser();
if (!user) {
@@ -15,5 +16,16 @@ export default async function SettingsPage() {
throw new Error('Team not found');
}
- return ;
+ return (
+
+ );
}
diff --git a/app/(dashboard)/layout.tsx b/app/(dashboard)/layout.tsx
index e33b0df06..812b4bd61 100644
--- a/app/(dashboard)/layout.tsx
+++ b/app/(dashboard)/layout.tsx
@@ -3,7 +3,7 @@
import Link from 'next/link';
import { useState } from 'react';
import { Button } from '@/components/ui/button';
-import { CircleIcon, Home, LogOut } from 'lucide-react';
+import { CircleIcon, Home, LogOut, CreditCard } from 'lucide-react';
import {
DropdownMenu,
DropdownMenuContent,
@@ -60,6 +60,12 @@ function Header() {
Dashboard
+
+
+
+ Credits
+
+