Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/tree-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const TreeItem = ( {
className={ cx( 'ps-6', isFirstLevel && 'border border-gray-300 rounded-sm py-2' ) }
>
{ node.children.length === 0 ? (
renderEmptyContent && renderEmptyContent( node.id ) ? (
renderEmptyContent ? (
renderEmptyContent( node.id )
) : (
<div className="text-gray-500 italic" aria-label={ __( 'Empty folder' ) }>
Expand Down
13 changes: 5 additions & 8 deletions src/modules/sync/components/sync-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,6 @@ const useDynamicTreeState = (
localSiteId,
] );

// Handle local file tree errors by clearing children to show custom error message
useEffect( () => {
if ( type === 'push' && localFileTreeError ) {
setTreeState( ( treeState ) => updateNodeById( treeState, 'wp-content', { children: [] } ) );
}
}, [ type, localFileTreeError, setTreeState ] );

return {
rewindId,
fetchChildren,
Expand Down Expand Up @@ -378,7 +371,11 @@ export function SyncDialog( {
</div>
);
}
return null;
return (
<div className="text-gray-500 italic" aria-label={ __( 'Empty folder' ) }>
{ __( 'Empty' ) }
</div>
);
} }
/>
</>
Expand Down