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 { deletePermission, upsertPermission } from "@/actions/admin-housekeeping";
|
||||||
import { StatusCard } from "@/components/admin/dashboard";
|
import { StatusCard } from "@/components/admin/dashboard";
|
||||||
import { prisma } from "@/lib/prisma";
|
import { prisma } from "@/lib/prisma";
|
||||||
@@ -67,31 +68,12 @@ export default async function AdminHousekeeping({
|
|||||||
<button type="submit" className="btn btn-primary">Search</button>
|
<button type="submit" className="btn btn-primary">Search</button>
|
||||||
</form>
|
</form>
|
||||||
<div style={{ display: "flex", gap: "0.5rem" }}>
|
<div style={{ display: "flex", gap: "0.5rem" }}>
|
||||||
<button
|
<Link href="/admin/housekeeping?mode=manage" className="btn btn-outline">
|
||||||
type="button"
|
|
||||||
className="btn btn-outline"
|
|
||||||
onClick={() => window.location.href = window.location.pathname + "?mode=manage"}
|
|
||||||
>
|
|
||||||
Manage
|
Manage
|
||||||
</button>
|
</Link>
|
||||||
<button
|
<Link href="/admin/housekeeping?mode=import&form=selected_ids" className="btn btn-outline">
|
||||||
type="button"
|
|
||||||
className="btn btn-outline"
|
|
||||||
onClick={() => window.location.href = window.location.pathname + "?mode=import&form=selected_ids"}
|
|
||||||
>
|
|
||||||
Import selection
|
Import selection
|
||||||
</button>
|
</Link>
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user