Fix Build: ungueltige Regex in DevTools-Nav durch String-Spread ersetzt
This commit is contained in:
@@ -3095,12 +3095,9 @@ export default function DevTools({ toast, mobile }) {
|
||||
const active = TOOL_DEFS.find(t=>t.id===activeTool);
|
||||
const ActiveComp = active?.tabs ? active.components[activeTab] : active?.component;
|
||||
|
||||
// Emoji/Icon aus Label extrahieren
|
||||
const getIcon = lbl => {
|
||||
const m = lbl.match(/^([\u{1F300}-\u{1FFFF}\u{2600}-\u{27BF}⏱⚡📅🎨🔐🔍🌐◻±{}]/u);
|
||||
return m ? m[0] : lbl[0];
|
||||
};
|
||||
const getText = lbl => lbl.replace(/^[\u{1F300}-\u{1FFFF}\u{2600}-\u{27BF}⏱⚡📅🎨🔐🔍🌐◻±{}]\s*/u,'').trim() || lbl;
|
||||
// Erstes Zeichen als Icon, Rest als Text (handles Emoji korrekt via spread)
|
||||
const getIcon = lbl => [...lbl][0] ?? '🔧';
|
||||
const getText = lbl => { const c=[...lbl]; return c.slice(1).join('').trim() || lbl; };
|
||||
|
||||
return (
|
||||
<div style={{padding:mobile?'14px 14px 90px':'36px 44px',maxWidth:860}}>
|
||||
|
||||
Reference in New Issue
Block a user