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} +