From 657f0e428ab08cbdeaa9e8713a0b6c433863b0ea Mon Sep 17 00:00:00 2001 From: kashaf-ansari-dev Date: Wed, 3 Jun 2026 01:46:56 +0500 Subject: [PATCH] mobile: display monograph view count Signed-off-by: kashaf-ansari-dev --- .../app/components/sheets/publish-note/index.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/mobile/app/components/sheets/publish-note/index.tsx b/apps/mobile/app/components/sheets/publish-note/index.tsx index 22f2dbfae..106d3b1a1 100644 --- a/apps/mobile/app/components/sheets/publish-note/index.tsx +++ b/apps/mobile/app/components/sheets/publish-note/index.tsx @@ -168,6 +168,14 @@ const PublishNoteSheet = ({ setPublishLoading(false); }; + const analytics = useAsync(async () => { + if (!isFeatureAvailable?.isAllowed || !monograph) { + return { totalViews: 0 }; + } + + return await db.monographs.analytics(monograph.id); + }, [monograph?.id, isFeatureAvailable?.isAllowed]); + return ( {strings.views()} + + + {analytics.result?.totalViews} +