File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
apps/twig/src/renderer/features/panels/components Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,6 @@ export const TabbedPanel: React.FC<TabbedPanelProps> = ({
7979 rightContent,
8080 emptyState,
8181} ) => {
82- const activeTab = content . tabs . find ( ( tab ) => tab . id === content . activeTabId ) ;
83-
8482 const handleSplitClick = async ( ) => {
8583 const result = await trpcVanilla . contextMenu . showSplitContextMenu . mutate ( ) ;
8684 if ( result . direction ) {
@@ -246,8 +244,19 @@ export const TabbedPanel: React.FC<TabbedPanelProps> = ({
246244 position = "relative"
247245 onClick = { ( ) => onPanelFocus ?.( panelId ) }
248246 >
249- { activeTab ? (
250- activeTab . component
247+ { content . tabs . length > 0 ? (
248+ content . tabs . map ( ( tab ) => (
249+ < div
250+ key = { tab . id }
251+ style = {
252+ tab . id === content . activeTabId
253+ ? { height : "100%" }
254+ : { display : "none" }
255+ }
256+ >
257+ { tab . component }
258+ </ div >
259+ ) )
251260 ) : emptyState ? (
252261 emptyState
253262 ) : (
You can’t perform that action at this time.
0 commit comments