Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

format clip pending and indexed count

Abhinav31fb1f65da49
diff --git a/apps/photos/src/components/Sidebar/AdvancedSettings.tsx b/apps/photos/src/components/Sidebar/AdvancedSettings.tsx
index 0dbac52bd1..5145fbf958 100644
--- a/apps/photos/src/components/Sidebar/AdvancedSettings.tsx
+++ b/apps/photos/src/components/Sidebar/AdvancedSettings.tsx
@@ -12,6 +12,7 @@ import { EnteMenuItem } from 'components/Menu/EnteMenuItem';
import { MenuItemGroup } from 'components/Menu/MenuItemGroup';
import { VerticallyCenteredFlex } from 'components/Container';
import { ClipExtractionStatus, ClipService } from 'services/clipService';
+import { formatNumber } from 'utils/number/format';
export default function AdvancedSettings({ open, onClose, onRootClose }) {
const [mlSearchSettingsView, setMlSearchSettingsView] = useState(false);
@@ -82,7 +83,7 @@ export default function AdvancedSettings({ open, onClose, onRootClose }) {
{t('INDEXED_ITEMS')}
</Typography>
<Typography>
- {indexingStatus.indexed}
+ {formatNumber(indexingStatus.indexed)}
</Typography>
</VerticallyCenteredFlex>
<VerticallyCenteredFlex
@@ -92,7 +93,7 @@ export default function AdvancedSettings({ open, onClose, onRootClose }) {
{t('PENDING_ITEMS')}
</Typography>
<Typography>
- {indexingStatus.pending}
+ {formatNumber(indexingStatus.pending)}
</Typography>
</VerticallyCenteredFlex>
</Stack>
diff --git a/apps/photos/src/utils/number/format.ts b/apps/photos/src/utils/number/format.ts
index 787e1f7b0b..568a4d6987 100644
--- a/apps/photos/src/utils/number/format.ts
+++ b/apps/photos/src/utils/number/format.ts
@@ -1,5 +1,7 @@
import i18n from 'i18next';
+const numberFormatter = new Intl.NumberFormat(i18n.language);
+
export function formatNumber(value: number): string {
- return new Intl.NumberFormat(i18n.language).format(value);
+ return numberFormatter.format(value);
}