Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Commit

Permalink
♻️ Init quickactions on app.js file
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-r committed Jul 17, 2020
1 parent c666da8 commit 0bffa51
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 10 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
import 'react-native-gesture-handler';
import config from 'react-native-config';
import QuickActions from 'react-native-quick-actions';
import React, { useEffect } from 'react';
import * as Sentry from '@sentry/react-native';
import codePush from 'react-native-code-push';
import { Provider } from './src/store';
import AppContainer from './src/containers/App';
import { quickActionShortcutItems } from './config/quickAction';

if (process.env.NODE_ENV === 'production') {
Sentry.init({
dsn: config.SENTRY_DSN_KEY
});
}

QuickActions.isSupported((error, supported) => {
if (supported) {
return QuickActions.setShortcutItems(quickActionShortcutItems);
}

return error;
});

const App = () => {
useEffect(() => {
codePush.sync({
Expand Down
9 changes: 0 additions & 9 deletions src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
DASHBOARD_COLOR
} from '../../../config/theme';
import {
quickActionShortcutItems,
QUICK_ACTION_PLAYLISTS,
QUICK_ACTION_FAVORIS
} from '../../../config/quickAction';
Expand All @@ -39,14 +38,6 @@ import AppPlayer from '../AppPlayer';
// :troll:
console.disableYellowBox = true;

QuickActions.isSupported((error, supported) => {
if (supported) {
return QuickActions.setShortcutItems(quickActionShortcutItems);
}

return error;
});

const Stack = createStackNavigator();
const Tab = createMaterialBottomTabNavigator();

Expand Down

0 comments on commit 0bffa51

Please sign in to comment.