Skip to content

Commit f9af7e1

Browse files
committed
feat(admin): wire /_admin/events route to EventsPage
Replaces the "Coming soon" stub with the full feature module. Search params page/pageSize validated via zod; sidebar link already existed so the page becomes clickable from the nav.
1 parent 0c420ec commit f9af7e1

1 file changed

Lines changed: 13 additions & 24 deletions

File tree

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,21 @@
1-
import {
2-
Card,
3-
CardContent,
4-
CardHeader,
5-
CardTitle,
6-
} from "@qibla/ui/components/card";
71
import { createFileRoute } from "@tanstack/react-router";
2+
import { z } from "zod";
3+
import { EventsPage } from "@/features/events";
4+
5+
const searchSchema = z.object({
6+
page: z.number().optional().default(1),
7+
pageSize: z.number().optional().default(20),
8+
});
89

910
export const Route = createFileRoute("/_admin/events/")({
10-
component: EventsPage,
11+
validateSearch: searchSchema,
12+
component: EventsRoute,
1113
});
1214

13-
function EventsPage() {
15+
function EventsRoute() {
16+
const search = Route.useSearch();
17+
1418
return (
15-
<div className="space-y-6">
16-
<div>
17-
<h2 className="text-2xl font-semibold tracking-tight">Events</h2>
18-
<p className="text-sm text-muted-foreground">
19-
Manage mosque events (Jummah, tafseer circles, Ramadan programs).
20-
</p>
21-
</div>
22-
<Card>
23-
<CardHeader>
24-
<CardTitle>Coming soon</CardTitle>
25-
</CardHeader>
26-
<CardContent className="text-sm text-muted-foreground">
27-
Event management UI will ship in the next batch.
28-
</CardContent>
29-
</Card>
30-
</div>
19+
<EventsPage page={search.page ?? 1} pageSize={search.pageSize ?? 20} />
3120
);
3221
}

0 commit comments

Comments
 (0)