Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

fix: incorrect hook order

Gérnyi Márk015be3d53a82
diff --git a/client/src/components/Admin/PermissionsPanel.tsx b/client/src/components/Admin/PermissionsPanel.tsx
index 7a7eaef75..3b3af4794 100644
--- a/client/src/components/Admin/PermissionsPanel.tsx
+++ b/client/src/components/Admin/PermissionsPanel.tsx
@@ -85,6 +85,8 @@ export default function PermissionsPanel(): React.ReactElement {
setDirty(true)
}
+ const entryMap = useMemo(() => new Map(entries.map(e => [e.key, e])), [entries])
+
if (loading) {
return (
<div className="p-8 text-center">
@@ -93,8 +95,6 @@ export default function PermissionsPanel(): React.ReactElement {
)
}
- const entryMap = useMemo(() => new Map(entries.map(e => [e.key, e])), [entries])
-
return (
<div className="space-y-6">
<div className="bg-white rounded-xl border border-slate-200 overflow-hidden">