Add event creation page and link from dashboard

Introduced a new page for creating events with a form to input event details and added a link from the dashboard to this page. The form includes fields for title, description, date, location, and public/private options, enhancing user functionality. Users are redirected to the event page upon successful creation.
This commit is contained in:
2025-03-12 09:22:06 +01:00
parent e57c63e60b
commit 9a59c88143
2 changed files with 160 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
import { useAuth } from "@/context/auth-context";
import Navbar from "@/components/layout/navbar";
import Link from "next/link";
export default function DashboardPage() {
const { user, isLoading } = useAuth();
@@ -40,14 +41,11 @@ export default function DashboardPage() {
<p className="text-gray-500 dark:text-gray-400">
No events yet
</p>
<button
className="mt-4 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors"
onClick={() =>
alert("Create event functionality coming soon!")
}
>
Create Your First Event
</button>
<Link href="/dashboard/events/new">
<button className="mt-4 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors">
Create Your First Event
</button>
</Link>
</div>
</div>
</div>