Skip to content

Commit f26dd8f

Browse files
authored
Merge pull request #169 from Crossbell-Box/revert-166-fix/commit-area-need-to-hide
Revert "fix: The bottom sheet do not close when the page navigate to other route"
2 parents 9af0127 + 251e584 commit f26dd8f

4 files changed

Lines changed: 2 additions & 15 deletions

File tree

env.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ declare global {
77
OWNER: string
88
UPDATES_URL: string
99
INFURA_ID: string
10-
CSB_SCAN: string
11-
CSB_XCHAR: string
12-
SENTRY_DSN: string
13-
SENTRY_ORG: string
14-
SENTRY_PROJECT: string
15-
SENTRY_AUTH_TOKEN: string
1610
}
1711
}
1812
}

src/components/Avatar/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ interface Props {
1717
size?: number
1818
useDefault?: boolean
1919
isNavigateToUserInfo?: boolean
20-
handleBeforeNavigate?: () => void
2120
}
2221

2322
const isValidUrl = (url) => {
@@ -32,7 +31,7 @@ const isValidUrl = (url) => {
3231
};
3332

3433
export const Avatar: FC<Props> = (props) => {
35-
const { character, size = 45, useDefault = false, isNavigateToUserInfo = true, handleBeforeNavigate } = props;
34+
const { character, size = 45, useDefault = false, isNavigateToUserInfo = true } = props;
3635
const navigation = useRootNavigation();
3736
const uri = character?.metadata?.content?.avatars?.[0];
3837
const name = character?.metadata?.content?.name;
@@ -46,7 +45,6 @@ export const Avatar: FC<Props> = (props) => {
4645
if (!character?.characterId) {
4746
return;
4847
}
49-
handleBeforeNavigate && handleBeforeNavigate();
5048
navigation.navigate("UserInfo", { characterId: character?.characterId });
5149
};
5250

src/components/CommentButton/index.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,6 @@ export const CommentButton: React.FC<Props> = ({ characterId, noteId, iconSize =
231231
}}
232232
onComment={comments.refetch}
233233
onEdit={comments.refetch}
234-
onNavigateToUserProfile={() => {
235-
bottomSheetRef.current.close();
236-
}}
237234
/>
238235
);
239236
}}

src/components/CommentItem/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export interface CommentItemProps extends ListItemProps {
3636
onPressEdit?: (comment: Comment) => void
3737
onComment?: () => Promise<any>
3838
onEdit?: () => Promise<any>
39-
onNavigateToUserProfile?: () => void
4039
}
4140

4241
export type Comment = NoteEntity & {
@@ -56,7 +55,6 @@ export const CommentItem: React.FC<CommentItemProps> = (props) => {
5655
onPressEdit: _onPressEdit,
5756
onComment,
5857
onEdit,
59-
onNavigateToUserProfile,
6058
...restProps
6159
} = props;
6260
const date = useDate();
@@ -135,7 +133,7 @@ export const CommentItem: React.FC<CommentItemProps> = (props) => {
135133
return (
136134
<>
137135
<XStack marginBottom="$2" gap="$3" {...restProps}>
138-
<Avatar useDefault size={isSubComment ? 36 : 40} character={comment?.character} handleBeforeNavigate={onNavigateToUserProfile} />
136+
<Avatar useDefault size={isSubComment ? 36 : 40} character={comment?.character} />
139137
<YStack flex={1}>
140138
<YStack flex={1}>
141139
<XStack alignItems="center" marginBottom="$1">

0 commit comments

Comments
 (0)