fix: housekeeping page onClick in server component replaced with Link
This commit is contained in:
1 parent
cf287dbc8b
commit
1ea953fd65
1 file changed
+5
-23
@@ -1,3 +1,4 @@
|
||||
import Link from "next/link";
|
||||
import { deletePermission, upsertPermission } from "@/actions/admin-housekeeping";
|
||||
import { StatusCard } from "@/components/admin/dashboard";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
@@ -67,31 +68,12 @@ export default async function AdminHousekeeping({
|
||||
<button type="submit" className="btn btn-primary">Search</button>
|
||||
</form>
|
||||
<div style={{ display: "flex", gap: "0.5rem" }}>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-outline"
|
||||
onClick={() => window.location.href = window.location.pathname + "?mode=manage"}
|
||||
>
|
||||
<Link href="/admin/housekeeping?mode=manage" className="btn btn-outline">
|
||||
Manage
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-outline"
|
||||
onClick={() => window.location.href = window.location.pathname + "?mode=import&form=selected_ids"}
|
||||
>
|
||||
</Link>
|
||||
<Link href="/admin/housekeeping?mode=import&form=selected_ids" className="btn btn-outline">
|
||||
Import selection
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-danger"
|
||||
onClick={() => {
|
||||
if (confirm("Are you sure you want to delete selected permissions?")) {
|
||||
// TODO: implement bulk delete
|
||||
}
|
||||
}}
|
||||
>
|
||||
Delete selected
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user