Merge remote master branch - resolved conflicts in cache files and frontend components

This commit is contained in:
Tomas Dvorak
2025-10-19 17:31:01 +02:00
14 changed files with 115 additions and 25 deletions
@@ -119,8 +119,6 @@ const MyUIbrixStyleEditor: React.FC<MyUIbrixStyleEditorProps> = ({ pageType, onC
const isAdmin = user?.role === 'admin';
const clubTheme = useClubTheme();
// Early return if not admin - MUST be before any other hooks
if (!isAdmin) return null;
const [isEditing, setIsEditing] = useState(false);
const [configs, setConfigs] = useState<PageElementConfig[]>([]);
const [localChanges, setLocalChanges] = useState<Record<string, string>>({});
@@ -1233,6 +1231,9 @@ const MyUIbrixStyleEditor: React.FC<MyUIbrixStyleEditorProps> = ({ pageType, onC
});
}, [isEditing, viewport, primaryColor, toast]);
// Early return if not admin (after all hooks)
if (!isAdmin) return null;
return (
<>
{/* Edit Mode - Active */}