Skip to content

fix(customSwitch): add the correct import#2

Open
Danisco212 wants to merge 1 commit intoarshigtx:mainfrom
Danisco212:fix-import
Open

fix(customSwitch): add the correct import#2
Danisco212 wants to merge 1 commit intoarshigtx:mainfrom
Danisco212:fix-import

Conversation

@Danisco212
Copy link

The import in customSwitch is pointing to a non-existing file. I have changed it to point to the correct "util" file.

@muhammad-ahsan099
Copy link

Please merge this branch.

@scottgratton
Copy link

npm install https://github.com/arshigtx/react-native-custom-switch#a965f4d

I pointed my npm install to this branch. Thanks for putting it up 🙏

@natemartins
Copy link

Since, this PR has been approved why has it not been merged?

Copy link

@adnandothussain adnandothussain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me 👍

@ghost
Copy link

ghost commented Dec 23, 2022

I use Yarn, have you updated it?

@ogbodo
Copy link

ogbodo commented Jan 14, 2023

why is this PR NOT merged yet?

@blaues0cke
Copy link

You can also apply this patch (react-native-custom-switch+1.0.7.patch) using patch-package

diff --git a/node_modules/react-native-custom-switch/src/customSwitch.js b/node_modules/react-native-custom-switch/src/customSwitch.js
index c638fc1..6d73b22 100644
--- a/node_modules/react-native-custom-switch/src/customSwitch.js
+++ b/node_modules/react-native-custom-switch/src/customSwitch.js
@@ -1,7 +1,7 @@
 import React, { useState, useEffect, useRef } from 'react';
 import { View, StyleSheet, Text, TouchableWithoutFeedback, Animated, LayoutAnimation, Platform, UIManager } from 'react-native';
 
-import hexToRgb from './hexToRgb';
+import hexToRgb from './utils';
 
 if (Platform.OS === 'android') {
   if (UIManager.setLayoutAnimationEnabledExperimental) {

@AhmedSarhan25
Copy link

please merge this PR for God's sake lol

@IgorBuilds
Copy link

npm install https://github.com/arshigtx/react-native-custom-switch#a965f4d

I pointed my npm install to this branch. Thanks for putting it up 🙏

Worked for me too!
yarn version:
yarn add https://github.com/Danisco212/react-native-custom-switch.git#fix-import

@IgorBuilds
Copy link

After I fixed the above error, I got an error about animation in android, searching I just found someone published a fixed version of this:
https://www.npmjs.com/package/react-native-custom-switch-new
best way to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants