Skip to content

Commit 5660941

Browse files
committed
fix: remove profiler code
1 parent 9ce715e commit 5660941

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

package/src/components/MessageInput/SendButton.tsx

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Profiler, useCallback } from 'react';
1+
import React, { useCallback } from 'react';
22

33
import { Pressable } from 'react-native';
44

@@ -44,27 +44,20 @@ export const SendButtonWithContext = (props: SendButtonPropsWithContext) => {
4444
}, [disabled, sendMessage]);
4545

4646
return (
47-
<Profiler
48-
id='Send Button'
49-
onRender={(id, phase, actualDuration, baseDuration, start, end) => {
50-
console.log({ actualDuration, baseDuration, end, id, phase, start });
51-
}}
47+
<Pressable
48+
disabled={disabled}
49+
onPress={onPressHandler}
50+
style={[sendButton]}
51+
testID='send-button'
5252
>
53-
<Pressable
54-
disabled={disabled}
55-
onPress={onPressHandler}
56-
style={[sendButton]}
57-
testID='send-button'
58-
>
59-
{command ? (
60-
<Search pathFill={disabled ? grey_gainsboro : accent_blue} {...searchIcon} />
61-
) : disabled ? (
62-
<SendRight fill={grey_gainsboro} size={32} {...sendRightIcon} />
63-
) : (
64-
<SendUp fill={accent_blue} size={32} {...sendUpIcon} />
65-
)}
66-
</Pressable>
67-
</Profiler>
53+
{command ? (
54+
<Search pathFill={disabled ? grey_gainsboro : accent_blue} {...searchIcon} />
55+
) : disabled ? (
56+
<SendRight fill={grey_gainsboro} size={32} {...sendRightIcon} />
57+
) : (
58+
<SendUp fill={accent_blue} size={32} {...sendUpIcon} />
59+
)}
60+
</Pressable>
6861
);
6962
};
7063

0 commit comments

Comments
 (0)