Skip to content

Commit

Permalink
fix: properly enable rn-gesture-handler legacy web implem (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
omniwired authored Nov 23, 2023
1 parent ecae998 commit e43f409
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { MetaMaskProvider } from "metamask-react";
import React, { ReactNode, memo, useEffect } from "react";
import { useForm, FormProvider } from "react-hook-form";
import { Platform, View } from "react-native";
import { enableLegacyWebImplementation } from "react-native-gesture-handler";
import { MenuProvider } from "react-native-popup-menu";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { Provider as ReduxProvider } from "react-redux";
Expand Down Expand Up @@ -42,6 +43,9 @@ const queryClient = new QueryClient();
type DefaultForm = {
novalue: string;
};
// this is required for react-native-gesture-handler to work on web
enableLegacyWebImplementation(true);
// ^ required for drog and drop on the dAppStore

export default function App() {
const methods = useForm<DefaultForm>();
Expand Down
2 changes: 0 additions & 2 deletions packages/screens/DAppStore/components/LeftRail.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState } from "react";
import { View } from "react-native";
import { DraxList, DraxProvider } from "react-native-drax";
import { enableLegacyWebImplementation } from "react-native-gesture-handler";
import { useSelector } from "react-redux";

import { SelectedDraggable } from "./SelectedDraggable";
Expand All @@ -21,7 +20,6 @@ export const LeftRail = () => {
const selectedApps = useSelector(selectCheckedApps);
const availableApps = useSelector(selectAvailableApps);
const [isDraggable, setIsDraggable] = useState(true);
enableLegacyWebImplementation(true);
return (
<View
style={{
Expand Down

0 comments on commit e43f409

Please sign in to comment.