Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: fix ts errors

Ammar Ahmed4c41e13c5d6c
diff --git a/apps/mobile/app/components/sheets/publish-note/index.tsx b/apps/mobile/app/components/sheets/publish-note/index.tsx
index 3971b176f..8c36e8993 100644
--- a/apps/mobile/app/components/sheets/publish-note/index.tsx
+++ b/apps/mobile/app/components/sheets/publish-note/index.tsx
@@ -198,7 +198,7 @@ const PublishNoteSheet = ({
};
const monographMetadata =
- monographData.result ?? lastMonographDataResult.current;
+ monographData.result?.metadata ?? lastMonographDataResult.current;
useEffect(() => {
const prevState = previousAppState.current;
@@ -432,7 +432,7 @@ const PublishNoteSheet = ({
{isFeatureAvailable?.isAllowed &&
!selfDestruct &&
monographMetadata &&
- monographMetadata?.totalViews > 0 ? (
+ monographMetadata?.analytics?.totalViews > 0 ? (
<View
style={{
flexDirection: "row",
@@ -456,7 +456,9 @@ const PublishNoteSheet = ({
}}
>
<Paragraph size={AppFontSize.sm}>{strings.views()}</Paragraph>
- <Paragraph>{monographMetadata?.totalViews || 0}</Paragraph>
+ <Paragraph>
+ {monographMetadata?.analytics?.totalViews || 0}
+ </Paragraph>
</View>
</View>
</View>