mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
Merge remote master branch - resolved conflicts in cache files and frontend components
This commit is contained in:
@@ -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 */}
|
||||
|
||||
Reference in New Issue
Block a user