Skip to content

Commit

Permalink
fix list layout
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux committed Aug 22, 2024
1 parent f890963 commit c32622e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/edit-site/src/components/post-fields/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { useEntityRecords, store as coreStore } from '@wordpress/core-data';
*/
import {
LAYOUT_GRID,
LAYOUT_LIST,
LAYOUT_TABLE,
OPERATOR_IS_ANY,
} from '../../utils/constants';
Expand Down Expand Up @@ -407,6 +408,20 @@ function usePostFields( viewType ) {
);
}

if ( viewType === LAYOUT_LIST ) {
if ( ! url ) {
return null;
}

return (
<img
className="edit-site-post-featured-image"
src={ url }
alt=""
/>
);
}

if ( ! url ) {
return (
<div
Expand Down

0 comments on commit c32622e

Please sign in to comment.