← All changes
|
js/components/ManageMenu/SnippetsTable/SnippetsTable.tsx
+3
-3
3.10.0
→
4.0.0-beta.2
View file →
| @@ -54,9 +54,9 @@ | ||
| 54 | 54 | <span className="snippet-type-name-full">{__('All Snippets', 'code-snippets')}</span> |
| 55 | 55 | <span className="snippet-type-name-short">{__('All', 'code-snippets')}</span> |
| 56 | 56 | </>} |
| 57 | 57 | </span> |
| 58 | - {count && !isProLocked && <span className="subnav-count">{count}</span>} | |
| 58 | + {count !== undefined && !isProLocked && <span className="subnav-count">{count}</span>} | |
| 59 | 59 | {isProLocked && <span className="pro-chip">{__('Pro', 'code-snippets')}</span>} |
| 60 | 60 | </a> |
| 61 | 61 | </li> |
| 62 | 62 | ) |
| @@ -61,8 +61,9 @@ | ||
| 61 | 61 | </li> |
| 62 | 62 | ) |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | + | |
| 65 | 66 | const SafeModeNotice = () => |
| 66 | 67 | window.CODE_SNIPPETS_MANAGE?.isSafeModeActive |
| 67 | 68 | ? <Notice type="error"> |
| 68 | 69 | <p> |
| @@ -82,10 +83,9 @@ | ||
| 82 | 83 | </p> |
| 83 | 84 | </Notice> |
| 84 | 85 | : null |
| 85 | 86 | |
| 86 | -// Counts render immediately from the values localized with the page, then | |
| 87 | -// switch to live values derived from the snippets list once it has loaded. | |
| 87 | +// Counts render immediately from localized values, then switch to live values. | |
| 88 | 88 | const useSnippetTypeCounts = () => { |
| 89 | 89 | const { snippetsList } = useSnippetsList() |
| 90 | 90 | |
| 91 | 91 | const countedSnippets = useMemo( |