Skip to content

Commit 9014320

Browse files
committed
fix: lint issue
1 parent 2ebd106 commit 9014320

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

packages/react-native-calendar-kit/src/components/DraggableEvent.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,7 @@ export const DraggableEvent: FC<DraggableEventProps> = ({
5757
};
5858
}, [])
5959
);
60-
const {
61-
minuteHeight,
62-
columnWidthAnim,
63-
start,
64-
numberOfDays,
65-
verticalListRef,
66-
gridListRef,
67-
} = useBody();
60+
const { minuteHeight, columnWidthAnim, start, numberOfDays } = useBody();
6861
const {
6962
dragStartUnix,
7063
dragSelectedStartUnix,
@@ -126,7 +119,6 @@ export const DraggableEvent: FC<DraggableEventProps> = ({
126119
}, [resourceIndex]);
127120

128121
const gesture = Gesture.Tap()
129-
.blocksExternalGesture(verticalListRef, gridListRef)
130122
.runOnJS(true)
131123
.onTouchesDown(() => {
132124
triggerDragSelectedEvent({
@@ -140,7 +132,6 @@ export const DraggableEvent: FC<DraggableEventProps> = ({
140132
});
141133

142134
const topEdgeGesture = Gesture.Tap()
143-
.blocksExternalGesture(verticalListRef, gridListRef)
144135
.runOnJS(true)
145136
.onTouchesDown(() => {
146137
triggerDragSelectedEvent({
@@ -154,7 +145,6 @@ export const DraggableEvent: FC<DraggableEventProps> = ({
154145
});
155146

156147
const bottomEdgeGesture = Gesture.Tap()
157-
.blocksExternalGesture(verticalListRef, gridListRef)
158148
.runOnJS(true)
159149
.onTouchesDown(() => {
160150
triggerDragSelectedEvent({

packages/react-native-calendar-kit/src/context/DragEventProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ const DragEventProvider: FC<
201201
const isDraggingSelectedEvent = useSharedValue(false);
202202
const isDraggingCreateAnim = useSharedValue(false);
203203

204-
const autoHScrollTimer = useRef<NodeJS.Timeout>();
205-
const autoVScrollTimer = useRef<NodeJS.Timeout>();
204+
const autoHScrollTimer = useRef<NodeJS.Timeout | undefined>(undefined);
205+
const autoVScrollTimer = useRef<NodeJS.Timeout | undefined>(undefined);
206206
const scrollTargetX = useSharedValue(0);
207207
const offsetYAnim = useSharedValue(0);
208208

packages/react-native-calendar-kit/src/context/LayoutProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const LayoutContext = createContext<Size>(DEFAULT_SIZE);
2121
const LayoutProvider: React.FC<PropsWithChildren<object>> = ({ children }) => {
2222
const [layout, setLayout] = useState(DEFAULT_SIZE);
2323

24-
const timerRef = useRef<NodeJS.Timeout>();
24+
const timerRef = useRef<NodeJS.Timeout | undefined>(undefined);
2525
const onLayout = useCallback((event: LayoutChangeEvent) => {
2626
if (timerRef.current) {
2727
clearTimeout(timerRef.current);

packages/react-native-calendar-kit/src/context/NowIndicatorProvider.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ const NowIndicatorProvider = ({ children }: NowIndicatorProviderProps) => {
4646

4747
const [currentDateUnix, setCurrentDateUnix] = useState(nowRef.current.date);
4848
const currentTime = useSharedValue(nowRef.current.time);
49-
const timerRef = useRef<NodeJS.Timeout>();
49+
const timerRef = useRef<NodeJS.Timeout | undefined>(undefined);
5050
const appState = useRef<AppStateStatus>(AppState.currentState);
51-
const appStateListener = useRef<NativeEventSubscription>();
51+
const appStateListener = useRef<NativeEventSubscription | undefined>(
52+
undefined
53+
);
5254

5355
const stopTimer = useCallback(() => {
5456
if (timerRef.current) {

packages/react-native-calendar-kit/src/service/recyclerlistview/core/RecyclerListView.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export default class RecyclerListView<
8989
private _scrollComponent: ScrollComponent | null = null;
9090
private _isFirstRender: boolean = true;
9191

92-
constructor(props: P, context?: any) {
93-
super(props, context);
92+
constructor(props: P) {
93+
super(props);
9494
this._virtualRenderer = new VirtualRenderer(
9595
this._renderStackWhenReady,
9696
(offset) => {
@@ -245,7 +245,9 @@ export default class RecyclerListView<
245245
public renderCompat(): JSX.Element {
246246
return (
247247
<ScrollComponent
248-
ref={(scrollComponent) => (this._scrollComponent = scrollComponent)}
248+
ref={(scrollComponent) =>
249+
(this._scrollComponent = scrollComponent) as any
250+
}
249251
{...this.props}
250252
{...this.props.scrollViewProps}
251253
onScroll={this._onScroll}

0 commit comments

Comments
 (0)