Mayo commited on
fix: render panel throw an error when no page selected
Browse files
ui/components/panels/RenderControlsPanel.tsx
CHANGED
|
@@ -143,6 +143,14 @@ export function RenderControlsPanel() {
|
|
| 143 |
return [...(availableFonts ?? [])].sort((a, b) => a.familyName.localeCompare(b.familyName))
|
| 144 |
}, [availableFonts])
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
const firstNode = textNodes[0]
|
| 147 |
const hasNodes = textNodes.length > 0
|
| 148 |
|
|
|
|
| 143 |
return [...(availableFonts ?? [])].sort((a, b) => a.familyName.localeCompare(b.familyName))
|
| 144 |
}, [availableFonts])
|
| 145 |
|
| 146 |
+
if (!page) {
|
| 147 |
+
return (
|
| 148 |
+
<div className='flex items-center justify-center py-6 text-xs text-muted-foreground'>
|
| 149 |
+
{t('textBlocks.emptyPrompt')}
|
| 150 |
+
</div>
|
| 151 |
+
)
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
const firstNode = textNodes[0]
|
| 155 |
const hasNodes = textNodes.length > 0
|
| 156 |
|