Bob AI: Add dashboard page
This commit is contained in:
@@ -2,11 +2,13 @@ import { Routes, Route } from 'react-router-dom';
|
||||
import Layout from './components/Layout';
|
||||
import HomePage from './pages/HomePage';
|
||||
|
||||
import DashboardPage from "@/pages/DashboardPage";
|
||||
export default function App() {
|
||||
return (
|
||||
<Routes>
|
||||
<Route element={<Layout />}>
|
||||
<Route path="/" element={<HomePage />} />
|
||||
<Route path="/dashboard" element={<DashboardPage />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
);
|
||||
|
||||
@@ -34,7 +34,9 @@ export default function Layout() {
|
||||
{
|
||||
"name": "Testimonials",
|
||||
"href": "#testimonials"
|
||||
}
|
||||
},
|
||||
{ name: "Dashboard", href: "/dashboard" },
|
||||
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
74
src/pages/DashboardPage.tsx
Normal file
74
src/pages/DashboardPage.tsx
Normal file
@@ -0,0 +1,74 @@
|
||||
import React from "react";
|
||||
import { routes } from "@/routes";
|
||||
import NavbarCentered from "@/components/ui/NavbarCentered";
|
||||
import HeroSplit from "@/components/sections/hero/HeroSplit";
|
||||
import MetricsSimpleCards from "@/components/sections/metrics/MetricsSimpleCards";
|
||||
import FeaturesIconCards from "@/components/sections/features/FeaturesIconCards";
|
||||
import FooterMinimal from "@/components/sections/footer/FooterMinimal";
|
||||
|
||||
export default function DashboardPage() {
|
||||
return (
|
||||
<div className="min-h-screen bg-background text-foreground flex flex-col">
|
||||
<NavbarCentered
|
||||
logo="DiscordDash"
|
||||
navItems={routes.map((r) => ({ name: r.label, href: r.path }))}
|
||||
ctaButton={{ text: "Login with Discord", href: "/login" }}
|
||||
/>
|
||||
|
||||
<main className="flex-grow">
|
||||
<HeroSplit
|
||||
tag="Authentication"
|
||||
title="Manage Your Discord Community"
|
||||
description="Connect your Discord account to access your personalized dashboard. Powered by Supabase for secure, real-time user data storage and seamless integration."
|
||||
primaryButton={{ text: "Login with Discord", href: "/auth/discord" }}
|
||||
secondaryButton={{ text: "View Documentation", href: "/docs" }}
|
||||
imageSrc="https://images.unsplash.com/photo-1614680376593-902f74cf0d41?auto=format&fit=crop&w=800&q=80"
|
||||
/>
|
||||
|
||||
<MetricsSimpleCards
|
||||
tag="Overview"
|
||||
title="Server Statistics"
|
||||
description="Real-time insights from your connected Discord server, synced instantly via Supabase."
|
||||
metrics={[
|
||||
{ value: "12.4k", description: "Total Registered Users" },
|
||||
{ value: "850", description: "Active Voice Sessions" },
|
||||
{ value: "99.9%", description: "Database Uptime" }
|
||||
]}
|
||||
/>
|
||||
|
||||
<FeaturesIconCards
|
||||
tag="Database"
|
||||
title="Powered by Supabase"
|
||||
description="Secure, scalable, and real-time data storage for your community's custom needs."
|
||||
features={[
|
||||
{
|
||||
icon: "🗄️",
|
||||
title: "User Profiles",
|
||||
description: "Store and manage custom user data, roles, and preferences securely in Postgres."
|
||||
},
|
||||
{
|
||||
icon: "📊",
|
||||
title: "Activity Logs",
|
||||
description: "Track message counts, voice time, and server interactions with real-time inserts."
|
||||
},
|
||||
{
|
||||
icon: "💰",
|
||||
title: "Economy System",
|
||||
description: "Built-in support for virtual currencies and inventory management using Supabase RPCs."
|
||||
},
|
||||
{
|
||||
icon: "⚡",
|
||||
title: "Real-time Sync",
|
||||
description: "Instant updates across all connected clients using Supabase real-time subscriptions."
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</main>
|
||||
|
||||
<FooterMinimal
|
||||
brand="DiscordDash"
|
||||
copyright="© 2024 DiscordDash. All rights reserved."
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -6,4 +6,5 @@ export interface Route {
|
||||
|
||||
export const routes: Route[] = [
|
||||
{ path: '/', label: 'Home', pageFile: 'HomePage' },
|
||||
{ path: '/dashboard', label: 'Dashboard', pageFile: 'DashboardPage' },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user