Skip to content

Commit 12ff5ce

Browse files
committed
feat: re-implemented copy curl and device shake sensor
1 parent 1d2c72c commit 12ff5ce

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/CopyItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type StyleProp,
66
type ViewStyle,
77
} from 'react-native';
8-
// import Clipboard from '@react-native-clipboard/clipboard';
8+
import Clipboard from '@react-native-clipboard/clipboard';
99
import Icon from './Icon';
1010

1111
interface CopyItemProps {
@@ -32,7 +32,7 @@ export const CopyItem: React.FC<CopyItemProps> = ({
3232

3333
const handleCopy = useCallback(async () => {
3434
try {
35-
// Clipboard.setString(textToCopy);
35+
Clipboard.setString(textToCopy);
3636
setCopied(true);
3737
if (timeoutRef.current) {
3838
clearTimeout(timeoutRef.current);

src/NetworkLoggerOverlay.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
} from 'react-native';
1414

1515
import NetworkLogItem from './NetworkLogItem';
16-
// import RNShake from 'react-native-shake';
16+
import RNShake from 'react-native-shake';
1717
import type { NetworkLog, NetworkLogger } from './types';
1818
import Icon from './Icon';
1919

@@ -40,13 +40,12 @@ export const NetworkLoggerOverlay: React.FC<NetworkLoggerOverlayProps> = ({
4040
if (!enableDeviceShake) {
4141
return;
4242
}
43-
// const subscription = RNShake.addListener(() => {
44-
// console.log('DEvice shaked');
45-
// setShowButton(true);
46-
// });
43+
const subscription = RNShake.addListener(() => {
44+
setShowButton(true);
45+
});
4746
return () => {
4847
unsubscribe();
49-
// subscription?.remove();
48+
subscription?.remove();
5049
};
5150
}, [networkLogger, enableDeviceShake]);
5251

0 commit comments

Comments
 (0)