Skip to content

Commit b423913

Browse files
committed
chore: refactoring
1 parent f9b085f commit b423913

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ PODS:
12421242
- ReactCommon/turbomodule/bridging
12431243
- ReactCommon/turbomodule/core
12441244
- Yoga
1245-
- react-native-swipe-reveal (0.1.0):
1245+
- react-native-swipe-reveal (0.1.2):
12461246
- DoubleConversion
12471247
- glog
12481248
- hermes-engine
@@ -1886,7 +1886,7 @@ SPEC CHECKSUMS:
18861886
React-logger: 697873f06b8ba436e3cddf28018ab4741e8071b6
18871887
React-Mapbuffer: c174e11bdea12dce07df8669d6c0dc97eb0c7706
18881888
React-microtasksnativemodule: 8a80099ad7391f4e13a48b12796d96680f120dc6
1889-
react-native-swipe-reveal: 7800b192a32fc904b194fca8f485c8c1b524b24f
1889+
react-native-swipe-reveal: c49a1f173e0aa0db6d227ac327f4b7f4f97e10d4
18901890
React-nativeconfig: f7ab6c152e780b99a8c17448f2d99cf5f69a2311
18911891
React-NativeModulesApple: 70600f7edfc2c2a01e39ab13a20fd59f4c60df0b
18921892
React-perflogger: ceb97dd4e5ca6ff20eebb5a6f9e00312dcdea872

src/components/GestureDetectorComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import React, { useMemo } from 'react';
12
import { GestureDetector } from 'react-native-gesture-handler';
23
import Animated from 'react-native-reanimated';
34
import { usePanXGesture } from '../hooks/usePanXGesture';
45
import type { TListItem } from '../types';
5-
import { useMemo } from 'react';
66
import { EAnimationType } from '../constants';
77
import { View } from 'react-native';
88
import { styles } from './SwipeRevealWrapper/SwipeRevealWrapper.styles';

src/components/SwipeRevealWrapper/SwipeRevealWrapper.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { useState } from 'react';
22
import type { TSwipeableItemWrapper } from '../../types';
33
import Animated from 'react-native-reanimated';
44
import { EAnimationType } from '../../constants';
@@ -22,9 +22,9 @@ export const SwipeableItemWrapperComponent = ({
2222
rightFullSwipeViewContainerStyle,
2323
itemContainerStyle,
2424
}: TSwipeableItemWrapper) => {
25-
const [leftSwipeViewWidth, setLeftSwipeViewWidth] = React.useState(0);
26-
const [rightSwipeViewWidth, setRightSwipeViewWidth] = React.useState(0);
27-
const [itemWidth, setItemWidth] = React.useState(0);
25+
const [leftSwipeViewWidth, setLeftSwipeViewWidth] = useState(0);
26+
const [rightSwipeViewWidth, setRightSwipeViewWidth] = useState(0);
27+
const [itemWidth, setItemWidth] = useState(0);
2828

2929
const onLayoutLeftSwipeView = (event: LayoutChangeEvent) => {
3030
setLeftSwipeViewWidth(event.nativeEvent.layout.width);

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import { SwipeableItemWrapperComponent } from './components/SwipeRevealWrapper/SwipeRevealWrapper';
23
import type { TSwipeableItemWrapper } from './types';
34

0 commit comments

Comments
 (0)