mobile: fix errors

This commit is contained in:
Ammar Ahmed
2026-06-16 15:41:30 +05:00
parent dd3489272c
commit f2616468fa
7 changed files with 24 additions and 13 deletions

View File

@@ -198,7 +198,7 @@ const PublishNoteSheet = ({
};
const monographMetadata =
monographData.result ?? lastMonographDataResult.current;
monographData.result?.metadata ?? lastMonographDataResult.current;
useEffect(() => {
const prevState = previousAppState.current;
@@ -290,7 +290,7 @@ const PublishNoteSheet = ({
{strings.publishedAt()}:
</Heading>
<Paragraph size={AppFontSize.sm} numberOfLines={1}>
{publishUrl}
{monographMetadata?.publishUrl}
</Paragraph>
</View>
@@ -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>

View File

@@ -187,14 +187,6 @@ const Sort = ({
});
}, [data]);
const onPress = (item: { index: number; group: GroupHeader }) => {
scrollRef.current?.current?.scrollToIndex({
index: item.index,
animated: true
});
close();
};
return (
<View
style={{

View File

@@ -464,6 +464,11 @@ const TabBar = (props: SimpleTabBarProps) => {
presentSheet({
component: (
<Sort
dataType={
props.navigationState.index === 1
? "notebook"
: "tag"
}
type={
props.navigationState.index === 1
? "notebook"

View File

@@ -64,7 +64,7 @@ interface InputProps extends TextInputProps {
marginBottom?: number;
button?: {
icon: string;
iconFamily: IconProps["iconFamily"];
iconFamily?: IconProps["iconFamily"];
color: ColorValue;
onPress: () => void;
testID?: string;

View File

@@ -6,6 +6,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: @lingui/cli\n"
"Language: en\n"
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Plural-Forms: \n"
#: src/strings.ts:2443
msgid " \"Notebook > Notes\""

View File

@@ -6,6 +6,12 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: @lingui/cli\n"
"Language: pseudo-LOCALE\n"
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Plural-Forms: \n"
#: src/strings.ts:2443
msgid " \"Notebook > Notes\""