Skip to content

Commit

Permalink
Fix the media validation notice shown even when auto conversion is en…
Browse files Browse the repository at this point in the history
…abled. (#34730)

Co-authored-by: Gergely Juhasz <gergely.juhasz@automattic.com>
  • Loading branch information
manzoorwanijk and gmjuhasz authored Dec 20, 2023
1 parent 6d7ac79 commit 86d3c5b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Fixed the media validation notice shown even when auto conversion is enabled.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default function PublicizeForm() {
<ValidationNotice
connectionsCount={ connections.length }
invalidConnectionIdsCount={ invalidIds.length }
shouldAutoConvert={ shouldAutoConvert }
/>
) ) }
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import Notice from '../notice';
export type ValidationNoticeProps = {
connectionsCount: number;
invalidConnectionIdsCount: number;
shouldAutoConvert: boolean;
};

export const ValidationNotice: React.FC< ValidationNoticeProps > = ( {
connectionsCount,
invalidConnectionIdsCount,
shouldAutoConvert,
} ) => {
return (
return shouldAutoConvert ? null : (
<Notice type={ 'warning' }>
<p>
{ connectionsCount === invalidConnectionIdsCount
Expand Down

0 comments on commit 86d3c5b

Please sign in to comment.