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:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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" />,
|
||||
|
||||
Reference in New Issue
Block a user