diff --git a/src/components/avatar-editor/AvatarEditorModelView.tsx b/src/components/avatar-editor/AvatarEditorModelView.tsx
index b9ee095..612773d 100644
--- a/src/components/avatar-editor/AvatarEditorModelView.tsx
+++ b/src/components/avatar-editor/AvatarEditorModelView.tsx
@@ -50,7 +50,6 @@ export const AvatarEditorModelView: FC<{
return (
- { /* ── Category / gender selector row ── */ }
{ (name === AvatarEditorFigureCategory.GENERIC) &&
<>
@@ -85,7 +84,6 @@ export const AvatarEditorModelView: FC<{
- { /* ── Colour palette row at bottom ── */ }
{ (maxPaletteCount >= 1) &&
diff --git a/src/components/avatar-editor/AvatarEditorView.tsx b/src/components/avatar-editor/AvatarEditorView.tsx
index f5c7e63..1945a17 100644
--- a/src/components/avatar-editor/AvatarEditorView.tsx
+++ b/src/components/avatar-editor/AvatarEditorView.tsx
@@ -74,7 +74,7 @@ export const AvatarEditorView: FC<{}> = props =>
return (
setIsVisible(false) } />
diff --git a/src/components/avatar-editor/figure-set/AvatarEditorFigureSetView.tsx b/src/components/avatar-editor/figure-set/AvatarEditorFigureSetView.tsx
index 87da8c7..7d7bd68 100644
--- a/src/components/avatar-editor/figure-set/AvatarEditorFigureSetView.tsx
+++ b/src/components/avatar-editor/figure-set/AvatarEditorFigureSetView.tsx
@@ -34,7 +34,7 @@ export const AvatarEditorFigureSetView: FC<{
if(!item) return null;
return (
- selectEditorPart(category.setType, item.partSet?.id ?? -1) } />
+ selectEditorPart(category.setType, item.partSet?.id ?? -1) } />
);
} } items={ category.partItems } overscan={ columnCount } />
);
diff --git a/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetItemView.tsx b/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetItemView.tsx
index 8757c6a..a77a4a8 100644
--- a/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetItemView.tsx
+++ b/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetItemView.tsx
@@ -1,17 +1,15 @@
-import { ColorConverter, IPartColor } from '@nitrots/nitro-renderer';
+import { IPartColor } from '@nitrots/nitro-renderer';
import { FC } from 'react';
-import { GetClubMemberLevel, GetConfigurationValue } from '../../../api';
+import { ColorUtils, GetClubMemberLevel, GetConfigurationValue } from '../../../api';
import { LayoutCurrencyIcon, LayoutGridItemProps } from '../../../common';
import { InfiniteGrid } from '../../../layout';
export const AvatarEditorPaletteSetItem: FC<{
- setType: string;
partColor: IPartColor;
isSelected: boolean;
- width?: string;
} & LayoutGridItemProps> = props =>
{
- const { setType = null, partColor = null, isSelected = false, width = '100%', ...rest } = props;
+ const { partColor = null, isSelected = false, style = {}, ...rest } = props;
if(!partColor) return null;
@@ -19,7 +17,17 @@ export const AvatarEditorPaletteSetItem: FC<{
const isLocked = isHC && (GetClubMemberLevel() < partColor.clubLevel);
return (
-
+
{ isHC && }
);
diff --git a/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetView.tsx b/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetView.tsx
index d19c6d4..55811f3 100644
--- a/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetView.tsx
+++ b/src/components/avatar-editor/palette-set/AvatarEditorPaletteSetView.tsx
@@ -29,7 +29,7 @@ export const AvatarEditorPaletteSetView: FC<{
if(!item) return null;
return (
- selectEditorColor(category.setType, paletteIndex, item.id) } />
+ selectEditorColor(category.setType, paletteIndex, item.id) } />
);
} } items={ category.colorItems[paletteIndex] } overscan={ columnCount } />
);
diff --git a/src/layout/InfiniteGrid.tsx b/src/layout/InfiniteGrid.tsx
index 7e8111f..e48e691 100644
--- a/src/layout/InfiniteGrid.tsx
+++ b/src/layout/InfiniteGrid.tsx
@@ -18,6 +18,22 @@ const InfiniteGridRoot = (props: Props) =>
const { items = [], columnCount = 4, overscan = 5, estimateSize = 45, squareItems = false, itemRender = null } = props;
const parentRef = useRef(null);
+ if(squareItems)
+ {
+ return (
+
+
+ { items.map((item, index) =>
+ {
+ if(!item) return ;
+
+ return { itemRender(item, index % columnCount) };
+ }) }
+
+
+ );
+ }
+
const virtualizer = useVirtualizer({
count: Math.ceil(items.length / columnCount),
overscan,