Skip to content

Commit

Permalink
chore: remove debugging logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Dec 7, 2020
1 parent f1dda70 commit 9a6a342
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions src/components/bottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,13 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(

//#region layout callbacks
const handleOnContainerMeasureHeight = useCallback((height: number) => {
console.log('BottomSheet', 'handleOnContainerMeasureHeight', height);
// console.log('BottomSheet', 'handleOnContainerMeasureHeight', height);
didSetContainerHeight.current = true;
setContainerHeight(height);
}, []);

const handleOnHandleMeasureHeight = useCallback((height: number) => {
console.log('BottomSheet', 'handleOnHandleMeasureHeight', height);
// console.log('BottomSheet', 'handleOnHandleMeasureHeight', height);
didSetHandleHeight.current = true;
setHandleHeight(height);
}, []);
Expand Down Expand Up @@ -507,7 +507,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
//#endregion

//#region render
console.log('BottomSheet', 'render', shouldMeasureContainerHeight);
// console.log('BottomSheet', 'render', shouldMeasureContainerHeight);
return (
<BottomSheetContainer
shouldMeasureHeight={shouldMeasureContainerHeight}
Expand Down
18 changes: 9 additions & 9 deletions src/components/bottomSheet/useTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Animated, {
cond,
block,
call,
debug,
// debug,
} from 'react-native-reanimated';
import { State } from 'react-native-gesture-handler';
import { useClock, useValue, snapPoint } from 'react-native-redash';
Expand Down Expand Up @@ -85,7 +85,7 @@ export const useTransition = ({

const finishTiming = useMemo(
() => [
debug('finish timing', config.toValue),
// debug('finish timing', config.toValue),
set(currentGesture, GESTURE.UNDETERMINED),
set(shouldAnimate, 0),
set(currentPosition, config.toValue),
Expand Down Expand Up @@ -156,13 +156,13 @@ export const useTransition = ({
cond(
eq(isReady, 1),
[
debug('current gesture', currentGesture),
// debug('current gesture', currentGesture),
/**
* In case animation get interrupted, we execute the finishTiming node and
* set current position the the animated position.
*/
cond(isAnimationInterrupted, [
debug('animation interrupted', isAnimationInterrupted),
// debug('animation interrupted', isAnimationInterrupted),
finishTiming,
set(currentPosition, animationState.position),
]),
Expand All @@ -175,7 +175,7 @@ export const useTransition = ({
currentGesture,
cond(isPanningContent, GESTURE.CONTENT, GESTURE.HANDLE)
),
debug('start panning', translateY),
// debug('start panning', translateY),
cond(
not(
greaterOrEq(
Expand Down Expand Up @@ -226,7 +226,7 @@ export const useTransition = ({
)
),
[
debug('gesture end', currentGesture),
// debug('gesture end', currentGesture),
set(
config.toValue,
snapPoint(
Expand Down Expand Up @@ -260,7 +260,7 @@ export const useTransition = ({
neq(manualSnapToPoint, config.toValue)
),
[
debug('manualSnapToPoint', manualSnapToPoint),
// debug('manualSnapToPoint', manualSnapToPoint),
set(config.toValue, manualSnapToPoint),
set(animationState.finished, 0),
set(shouldAnimate, 1),
Expand All @@ -273,11 +273,11 @@ export const useTransition = ({
* Animation Node.
*/
cond(shouldAnimate, [
debug('animating', shouldAnimate),
// debug('animating', shouldAnimate),
cond(
and(not(clockRunning(clock)), not(animationState.finished)),
[
debug('start animating', shouldAnimate),
// debug('start animating', shouldAnimate),
/**
* `onAnimate` node
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const BottomSheetContainerComponent = ({
//#endregion

//#region render
console.log('BottomSheetContainer', 'render', shouldMeasureHeight);
// console.log('BottomSheetContainer', 'render', shouldMeasureHeight);
return (
<View
pointerEvents="box-none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ const BottomSheetHandleContainerComponent = ({
);
}, [animatedIndex, animatedPosition, _providedHandleComponent]);

console.log(
'BottomSheetHandleContainer',
'render',
shouldRenderHandle,
shouldMeasureHeight
);
// console.log(
// 'BottomSheetHandleContainer',
// 'render',
// shouldRenderHandle,
// shouldMeasureHeight
// );
return shouldRenderHandle ? (
<PanGestureHandler
simultaneousHandlers={simultaneousHandlers}
Expand Down

0 comments on commit 9a6a342

Please sign in to comment.