fix: resolve TypeScript errors in mini-map and layer-effects-panel

- Add null check for layer.canvas before drawing in mini-map
- Change JSX.Element to React.ReactElement in layer-effects-panel
- Fixes deployment build errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-21 17:53:59 +01:00
parent 5c4763cb62
commit 6a47efc164
2 changed files with 3 additions and 2 deletions

View File

@@ -64,9 +64,10 @@ export function MiniMap() {
ctx.scale(scale, scale);
layers
.filter((layer) => layer.visible)
.filter((layer) => layer.visible && layer.canvas)
.sort((a, b) => a.order - b.order) // Bottom to top
.forEach((layer) => {
if (!layer.canvas) return;
ctx.globalAlpha = layer.opacity;
ctx.drawImage(layer.canvas, layer.x, layer.y);
});

View File

@@ -34,7 +34,7 @@ const EFFECT_NAMES: Record<EffectType, string> = {
satin: 'Satin',
};
const EFFECT_ICONS: Record<EffectType, JSX.Element> = {
const EFFECT_ICONS: Record<EffectType, React.ReactElement> = {
dropShadow: <Sparkles className="h-3 w-3" />,
innerShadow: <Sparkles className="h-3 w-3" />,
outerGlow: <Sparkles className="h-3 w-3" />,