Skip to content

Commit

Permalink
Fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Dec 7, 2024
1 parent d08b88c commit d3e5e32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/ToggleSwitch/ToggleSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ export default function ToggleSwitch({
const translateAnimation = useRef(new Animated.Value(40)).current;
const scaleAnimation = useRef(new Animated.Value(0)).current;

const runAnimations = (value: boolean) => {
const runAnimations = (newValue: boolean) => {
if (!trueLabelLayout || !falseLabelLayout) return;

Animated.timing(translateAnimation, {
duration: 100,
toValue: value
toValue: newValue
? trueLabelLayout.x + trueLabelLayout.width / 2 - 2
: falseLabelLayout.x + falseLabelLayout.width / 2 + 2,
useNativeDriver: true,
}).start();

Animated.timing(scaleAnimation, {
duration: 100,
toValue: (value ? trueLabelLayout.width : falseLabelLayout.width) ?? 0,
toValue: (newValue ? trueLabelLayout.width : falseLabelLayout.width) ?? 0,
useNativeDriver: true,
}).start();
};
Expand Down
5 changes: 0 additions & 5 deletions src/components/TreeDisplay/TreeDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import { Text, TextInput, View } from 'react-native';
import SvgBear from '@/icons/Bear';
import SvgDrop from '@/icons/Drop';
import SvgFlash from '@/icons/Flash';
import SvgFruit from '@/icons/Fruit';
import SvgLeaf from '@/icons/Leaf';
import Lightbulb from '@/icons/Lightbulb';
import SvgLocationPin from '@/icons/Location';
import SvgNuts from '@/icons/Nuts';
import SvgPaintbucket from '@/icons/Paintbucket';
import SvgRuler from '@/icons/Ruler';
import SvgShapes from '@/icons/Shapes';
import SvgTree from '@/icons/Tree';
import SvgWarning2 from '@/icons/Warning2';
import SvgWateringCan from '@/icons/WateringCan';
import { TreeFruitType } from '@/types/species';
import { displayValue, Tree } from '@/types/tree';
import styles from './styles';

Expand Down

0 comments on commit d3e5e32

Please sign in to comment.