Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed Oct 26, 2021
1 parent f249b08 commit b50b783
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 1 addition & 5 deletions config/webpack/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const {IgnorePlugin, DefinePlugin} = require('webpack');
const {IgnorePlugin} = require('webpack');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');
Expand Down Expand Up @@ -42,10 +42,6 @@ const webpackConfig = {
usePolyfillIO: platform === 'web',
}),

// Configure the React Native Reanimated web support
// https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/web-support
new DefinePlugin({process: {env: {}}}),

// Copies favicons into the dist/ folder to use for unread status
new CopyPlugin({
patterns: [
Expand Down
4 changes: 3 additions & 1 deletion src/libs/Navigation/AppNavigator/DrawerNavigator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const DrawerNavigator = props => (
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}

// Modern implementation of drawer does not work on mobile web
// Drawer's implementaion is buggy. Modern implementaion does not work on mobile web and legacy breaks the layout on Desktop while resizing.
// For some reason, drawer never closes when opening the Drawer screen on mobile web.
// So we will switch between implementations based on the device width.
// eslint-disable-next-line react/jsx-props-no-multi-spaces
useLegacyImplementation={props.isSmallScreenWidth}
/>
Expand Down
3 changes: 2 additions & 1 deletion src/libs/Navigation/CustomActions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import _ from 'underscore';
import {CommonActions, StackActions, DrawerActions} from '@react-navigation/native';
import lodashGet from 'lodash/get';

Expand Down Expand Up @@ -73,7 +74,7 @@ function pushDrawerRoute(screenName, params, navigationRef) {
}

const screenRoute = {type: 'route', name: screenName};
const history = [...(state.history || [screenRoute])].map(() => screenRoute);
const history = _.map([...(state.history || [screenRoute])], () => screenRoute);

// Force drawer to close and show the report screen
history.push({
Expand Down

0 comments on commit b50b783

Please sign in to comment.