Skip to content

Commit 57d42f0

Browse files
committed
Move hooks to the hooks folder
1 parent 6b8c9ea commit 57d42f0

File tree

9 files changed

+7
-15
lines changed

9 files changed

+7
-15
lines changed

generatedTypes/hooks/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export { default as useToggleValue } from './useToggleValue';
22
export { default as useDidUpdate } from './useDidUpdate';
3+
export { default as useScrollEnabler } from './useScrollEnabler';
4+
export { default as useScrollReached } from './useScrollReached';

src/commons/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,9 @@ module.exports = {
2525
get withScrollEnabler() {
2626
return require('./withScrollEnabler').default;
2727
},
28-
get useScrollEnabler() {
29-
return require('./useScrollEnabler').default;
30-
},
3128
get withScrollReached() {
3229
return require('./withScrollReached').default;
3330
},
34-
get useScrollReached() {
35-
return require('./useScrollReached').default;
36-
},
3731
get modifiers() {
3832
return require('./modifiers');
3933
}

src/components/tabController/FadedScrollView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, {useCallback} from 'react';
22
import {ViewProps, ScrollView, ScrollViewProps, NativeSyntheticEvent, NativeScrollEvent} from 'react-native';
33
import Fader from '../fader';
4-
import useScrollEnabler from '../../commons/useScrollEnabler';
5-
import useScrollReached from '../../commons/useScrollReached';
4+
import useScrollEnabler from '../../hooks/useScrollEnabler';
5+
import useScrollReached from '../../hooks/useScrollReached';
66
import forwardRef, {ForwardRefInjectedProps} from '../../commons/forwardRef';
77

88
export type FadedScrollViewProps = ViewProps &

src/hooks/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
export {default as useToggleValue} from './useToggleValue';
22
export {default as useDidUpdate} from './useDidUpdate';
3+
export {default as useScrollEnabler} from './useScrollEnabler';
4+
export {default as useScrollReached} from './useScrollReached';
File renamed without changes.

src/commons/useScrollReached.ts renamed to src/hooks/useScrollReached/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {useState, useCallback} from 'react';
22
import {NativeSyntheticEvent, NativeScrollEvent} from 'react-native';
3-
import {Constants} from '../helpers';
3+
import {Constants} from '../../helpers';
44

55
export type Props = {
66
/**

src/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,9 @@ export default {
223223
get withScrollEnabler() {
224224
return require('./commons').withScrollEnabler;
225225
},
226-
get useScrollEnabler() {
227-
return require('./commons').useScrollEnabler;
228-
},
229226
get withScrollReached() {
230227
return require('./commons').withScrollReached;
231228
},
232-
get useScrollReached() {
233-
return require('./commons').useScrollReached;
234-
},
235229
get Modifiers() {
236230
return require('./commons').modifiers;
237231
},

0 commit comments

Comments
 (0)