Local Build and Deploy / deploy (push) Failing after 53s
Wire orphan routes into hub tabs, group Radio into primary/tools rows, show theme/language once on desktop, and remove duplicate page titles under AdminHubChrome. Co-authored-by: Cursor <[email protected]>
48 lines
976 B
TypeScript
48 lines
976 B
TypeScript
import { fetchAdminList } from "@/lib/admin-list";
|
|
import { PERMS } from "@/lib/permissions";
|
|
import { OnlineTable } from "./online-table";
|
|
|
|
export default async function OnlineUsersPage({
|
|
params: paramsPromise,
|
|
searchParams,
|
|
}: {
|
|
params: Promise<{ locale: string }>;
|
|
searchParams: Promise<Record<string, string>>;
|
|
}) {
|
|
const result = await fetchAdminList(
|
|
{
|
|
permission: PERMS.USERS_VIEW,
|
|
model: "user",
|
|
searchFields: ["username", "motto"],
|
|
baseWhere: { online: "1" },
|
|
defaultPerPage: 50,
|
|
select: {
|
|
id: true,
|
|
username: true,
|
|
motto: true,
|
|
look: true,
|
|
},
|
|
},
|
|
paramsPromise,
|
|
searchParams,
|
|
);
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<p className="text-muted-foreground">
|
|
Currently online users ({result.total} connected)
|
|
</p>
|
|
|
|
<OnlineTable
|
|
data={{
|
|
rows: result.rows,
|
|
total: result.total,
|
|
page: result.page,
|
|
perPage: result.perPage,
|
|
lastPage: result.lastPage,
|
|
}}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|