From 1909beab65f6cdd4fa1d7320199096d71f0e189a Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Sun, 18 Oct 2020 22:55:57 +0200 Subject: [PATCH 01/10] react-navigation-update --- app/navigation.js | 4 +- package.json | 8 +-- yarn.lock | 131 ++++++++++++++++++++++------------------------ 3 files changed, 70 insertions(+), 73 deletions(-) diff --git a/app/navigation.js b/app/navigation.js index 817085c..e961f52 100644 --- a/app/navigation.js +++ b/app/navigation.js @@ -4,6 +4,8 @@ import { NavigationActions, } from 'react-navigation'; +import { NavigationContainer } from '@react-navigation/native'; + import { createDrawerNavigator, DrawerActions } from 'react-navigation-drawer'; import { createStackNavigator } from 'react-navigation-stack'; @@ -60,7 +62,7 @@ const AppNavigator = createSwitchNavigator({ SignedIn: SignedInNavigator, }); -const AppContainer = createAppContainer(AppNavigator); +const AppContainer = `${{ AppNavigator }}`; let navigator; diff --git a/package.json b/package.json index 900b5cb..a6505e3 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,10 @@ "@react-native-community/status-bar": "^1.0.3", "@react-native-firebase/app": "^8.4.6", "@react-native-firebase/iid": "^7.4.9", - "@react-native-firebase/messaging": "^7.9.1", + "@react-native-firebase/messaging": "^7.9.3", + "@react-navigation/drawer": "^5.9.3", + "@react-navigation/native": "^5.7.6", + "@react-navigation/stack": "^5.9.3", "@sentry/react-native": "^1.9.0", "jetifier": "^1.6.6", "moment": "^2.29.1", @@ -80,9 +83,6 @@ "react-native-snackbar": "^2.2.3", "react-native-vector-icons": "^7.1.0", "react-native-webview": "^10.10.0", - "react-navigation": "^4.4.3", - "react-navigation-drawer": "^2.5.2", - "react-navigation-stack": "^2.10.0", "react-redux": "^7.2.2", "redux": "^4.0.5", "redux-saga": "^1.1.3", diff --git a/yarn.lock b/yarn.lock index 1bb7cfa..c72296c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1943,28 +1943,53 @@ resolved "https://registry.yarnpkg.com/@react-native-firebase/iid/-/iid-7.4.9.tgz#9a8281b7cbb46d9191c40cfb0ae141fc219d99f0" integrity sha512-cRIPVKQax/MicfxV6SDKUkI0buFmXXL/5lqnstA4b+VgGecj6DEAgXTXJL7iKXPVq7DWoB6mSU2glZ77GcS+ow== -"@react-native-firebase/messaging@^7.9.1": - version "7.9.1" - resolved "https://registry.yarnpkg.com/@react-native-firebase/messaging/-/messaging-7.9.1.tgz#4011272129ae36b034625a2b615934daa210537d" - integrity sha512-/BQPs4L9/Bz01cYHNzq40NmihpRn+I3Y/1LX/RXj8Nf6LGh3q+1xx02ycOwm2FqBrb1x6nUC95LCxfwe/lF8Ug== +"@react-native-firebase/messaging@^7.9.3": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@react-native-firebase/messaging/-/messaging-7.9.2.tgz#f5946ce0da4c1454df4701de7284d52a4ccc8d5b" + integrity sha512-xK9oRkQAxJ5+9e3W9EUnxqhecA2iwZb4OCYPWyO5BzldIMa1B4UdYLHDHU8oYpgsefqS51bPDdczC0yn+/8RTA== + +"@react-navigation/core@^5.12.5": + version "5.12.5" + resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-5.12.5.tgz#434a34893368de1c9daca9508fdd7be94d1ec642" + integrity sha512-+QdQDtC75K1sBfACwCUNFlrCOYf36GYGr9YURHugm3LDEHUwAj7HPJA8FFLw1Rmp5N/P5q9Uct2B/XxJhYzKqA== + dependencies: + "@react-navigation/routers" "^5.4.12" + escape-string-regexp "^4.0.0" + nanoid "^3.1.12" + query-string "^6.13.5" + react-is "^16.13.0" + use-subscription "^1.4.0" -"@react-navigation/core@^3.7.9": - version "3.7.9" - resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-3.7.9.tgz#3f7ba0fcb6c8d74a77a057382af198d84c7c4e3b" - integrity sha512-EknbzM8OI9A5alRxXtQRV5Awle68B+z1QAxNty5DxmlS3BNfmduWNGnim159ROyqxkuDffK9L/U/Tbd45mx+Jg== +"@react-navigation/drawer@^5.9.3": + version "5.9.3" + resolved "https://registry.yarnpkg.com/@react-navigation/drawer/-/drawer-5.9.3.tgz#d8b9a6d46a7fe436fcc8d410a10017852e420042" + integrity sha512-bc9cyJGONvTf6tsdwjgyMV5VMVIgJc9URMGbiXzj68Vp94lsxi6YbsOW01ErLpD8ltyCBNEC+Ll/1vv6CZiJaQ== dependencies: - hoist-non-react-statics "^3.3.2" - path-to-regexp "^1.8.0" - query-string "^6.13.6" - react-is "^16.13.0" + color "^3.1.2" + react-native-iphone-x-helper "^1.2.1" -"@react-navigation/native@^3.8.3": - version "3.8.3" - resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.8.3.tgz#acaca7239059465220955767dafafb17f7b47e5e" - integrity sha512-1yLd2pi8SK3wPC58mWZ5fjW5uYr1gmMN8YwjkA2qVjyVYfzzctRkoFDu8poO5UzxEIgf/4ns6ezBtKY1Q601UQ== +"@react-navigation/native@^5.7.6": + version "5.7.6" + resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-5.7.6.tgz#47546c512488d0e9c343219af635e1a44881761d" + integrity sha512-u+o9Ifs4//Ah6UczXiaAV+hiWPL0NyTbErj5WayeQUd6K5IIbA1UwumRVWs2Xp8q/4Q9h6FpPHUcKOyiTxhaqA== dependencies: - hoist-non-react-statics "^3.3.2" - react-native-safe-area-view "^0.14.9" + "@react-navigation/core" "^5.12.5" + nanoid "^3.1.12" + +"@react-navigation/routers@^5.4.12": + version "5.4.12" + resolved "https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.4.12.tgz#5c3690650c94be3a54b617a1c07510d2f604c03f" + integrity sha512-IwMmxeb5e6LboljhakmhtrHBXLYFrFDr2c1GjAG538e4MjT4QGi/ZYckAxCh/NqKI0knnzqKppPl2NsOMv/NoQ== + dependencies: + nanoid "^3.1.12" + +"@react-navigation/stack@^5.9.3": + version "5.9.3" + resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.9.3.tgz#c12cbd7cc8436e3995aa291d7617c5b8f7a950ea" + integrity sha512-/CJ5Rsrc9bMI20dD8oC/QSZHARMFuUv8DeoiYE7R2N0M44cFupF1CrzaZBBC/S4Zi1ahZ0A+Hj/gAzAEQrNTvA== + dependencies: + color "^3.1.2" + react-native-iphone-x-helper "^1.2.1" "@redux-saga/core@^1.1.3": version "1.1.3" @@ -3140,7 +3165,7 @@ color-support@^1.1.3: resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== -color@^3.1.3: +color@^3.1.2: version "3.1.3" resolved "https://registry.yarnpkg.com/color/-/color-3.1.3.tgz#ca67fb4e7b97d611dcde39eceed422067d91596e" integrity sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ== @@ -3742,6 +3767,11 @@ escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^1.14.1: version "1.14.3" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" @@ -4588,11 +4618,6 @@ hermes-profile-transformer@^0.0.6: dependencies: source-map "^0.7.3" -hoist-non-react-statics@^2.3.1: - version "2.5.5" - resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" - integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== - hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" @@ -6668,6 +6693,11 @@ nan@^2.12.1: resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01" integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw== +nanoid@^3.1.12: + version "3.1.12" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.12.tgz#6f7736c62e8d39421601e4a0c77623a97ea69654" + integrity sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -7165,13 +7195,6 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== -path-to-regexp@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" - integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== - dependencies: - isarray "0.0.1" - path-type@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" @@ -7399,10 +7422,10 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -query-string@^6.13.6: - version "6.13.6" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.13.6.tgz#e5ac7c74f2a5da43fbca0b883b4f0bafba439966" - integrity sha512-/WWZ7d9na6s2wMEGdVCVgKWE9Rt7nYyNIf7k8xmHXcesPMlEzicWo3lbYwHyA4wBktI2KrXxxZeACLbE84hvSQ== +query-string@^6.13.5: + version "6.13.5" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.13.5.tgz#99e95e2fb7021db90a6f373f990c0c814b3812d8" + integrity sha512-svk3xg9qHR39P3JlHuD7g3nRnyay5mHbrPctEBDUxUkHRifPHXJDhBUycdCC0NBjXoDf44Gb+IsOZL1Uwn8M/Q== dependencies: decode-uri-component "^0.2.0" split-on-first "^1.0.0" @@ -7502,10 +7525,10 @@ react-native-image-zoom-viewer@^3.0.1: dependencies: react-native-image-pan-zoom "^2.1.12" -react-native-iphone-x-helper@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.0.tgz#84fd13e6b89cc3aa4daa80ec514bf15cb724d86d" - integrity sha512-+/bcZWFeZt0xSS/+3CHM5K7qPL4vDO/3ARLIowzFpUPGZiPsv9+NET+XNqqseRYwFJwYMmtX+Q4TZKxAVy09ew== +react-native-iphone-x-helper@^1.2.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz#20c603e9a0e765fd6f97396638bdeb0e5a60b010" + integrity sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg== react-native-linear-gradient@^2.5.6: version "2.5.6" @@ -7534,13 +7557,6 @@ react-native-safe-area-context@^3.1.8: resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-3.1.8.tgz#7a9883aa0f38f9c77d4bef2b89e4e285bc1024a3" integrity sha512-9gUlsDZ96QwT9AKzA6aVWM/NX5rlJgauZ9HgCDVzKbe29UQYT1740QJnnaI2GExmkFGp6o7ZLNhCXZW95eYVFA== -react-native-safe-area-view@^0.14.9: - version "0.14.9" - resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.9.tgz#90ee8383037010d9a5055a97cf97e4c1da1f0c3d" - integrity sha512-WII/ulhpVyL/qbYb7vydq7dJAfZRBcEhg4/UWt6F6nAKpLa3gAceMOxBxI914ppwSP/TdUsandFy6lkJQE0z4A== - dependencies: - hoist-non-react-statics "^2.3.1" - react-native-screens@^2.12.0: version "2.12.0" resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.12.0.tgz#579b7a6f99b3dd777ef4a447682e46f10ce9f5eb" @@ -7611,27 +7627,6 @@ react-native@0.63.3: use-subscription "^1.0.0" whatwg-fetch "^3.0.0" -react-navigation-drawer@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-2.5.2.tgz#ab6338596008ffc6198edf6126419f77936a5be1" - integrity sha512-t8zp2o7h4rCOz5us1jv7Z6LZ7Bl1IIXnNmJMpMXxcSYxvpcDLDm4PPn74M6Mw1yTuDyKI5EhTo+gGAewnxTf5Q== - -react-navigation-stack@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-2.10.0.tgz#c961fec5e563f46030641849ba4775bfadf5cfcf" - integrity sha512-2WM2maXs+3nfAODfJiHSO8GmKdugHCdFkiz9kG3G5ber+22fusT4lvord4Yq3dizYa319GBhRI0PVn07FmYHrg== - dependencies: - color "^3.1.3" - react-native-iphone-x-helper "^1.3.0" - -react-navigation@^4.4.3: - version "4.4.3" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.4.3.tgz#41a83583e7ee07c9c9e0fb8ee0508261f239086c" - integrity sha512-tNBQQzbw0PVo9FLypQUUCISMcXW0wCW8oQeHtY0spWf35KC3IZHq/WcBm4E956wFsaqrDMGCUnyaVrxZNSuUGg== - dependencies: - "@react-navigation/core" "^3.7.9" - "@react-navigation/native" "^3.8.3" - react-redux@^7.2.2: version "7.2.2" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.2.tgz#03862e803a30b6b9ef8582dadcc810947f74b736" @@ -8991,7 +8986,7 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= -use-subscription@^1.0.0: +use-subscription@^1.0.0, use-subscription@^1.4.0: version "1.4.1" resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.4.1.tgz#edcbcc220f1adb2dd4fa0b2f61b6cc308e620069" integrity sha512-7+IIwDG/4JICrWHL/Q/ZPK5yozEnvRm6vHImu0LKwQlmWGKeiF7mbAenLlK/cTNXrTtXHU/SFASQHzB6+oSJMQ== From c37e5b078704d61401b36b3504672676079ca316 Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Thu, 29 Oct 2020 11:52:29 +0100 Subject: [PATCH 02/10] Some changeS --- app/navigation.js | 55 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/app/navigation.js b/app/navigation.js index e961f52..b8ca2ee 100644 --- a/app/navigation.js +++ b/app/navigation.js @@ -4,10 +4,10 @@ import { NavigationActions, } from 'react-navigation'; -import { NavigationContainer } from '@react-navigation/native'; +import { NavigationContainer, DrawerActions, NavigationAction } from '@react-navigation/native'; -import { createDrawerNavigator, DrawerActions } from 'react-navigation-drawer'; -import { createStackNavigator } from 'react-navigation-stack'; +import { createDrawerNavigator } from '@react-navigation/drawer'; +import { createStackNavigator } from '@react-navigation/stack'; import Login from './ui/screens/login/LoginScreenConnector'; import Welcome from './ui/screens/welcome/WelcomeScreenConnector'; @@ -26,6 +26,7 @@ import EventAdmin from './ui/screens/events/EventAdminScreenConnector'; import PizzaAdmin from './ui/screens/pizza/PizzaAdminScreenConnector'; import Sidebar from './ui/components/sidebar/SidebarConnector'; +<<<<<<< HEAD const MainNavigator = createDrawerNavigator( { Welcome, @@ -55,6 +56,54 @@ const SignedInNavigator = createStackNavigator( headerMode: 'none', } ); +======= +const Drawer = createDrawerNavigator(); + +function MainNavigator() { + return ( + + + ); +} + +const MainNavigator = createDrawerNavigator({ + Welcome, + Calendar, + MemberList, + Photos, + Settings, +}, { + contentComponent: Sidebar, +}); + +const Stack = createStackNavigator(); + +function SignedInNavigator() { + return ( + + + ); +} + +const SignedInNavigator = createStackNavigator({ + MainNavigator, + Event, + Profile, + Pizza, + PhotoAlbum, + PhotoGallery, + Registration, + EventAdmin, + PizzaAdmin, +}, { + headerMode: 'none', +}); +>>>>>>> Some changeS const AppNavigator = createSwitchNavigator({ Splash: SplashScreen, From 797f48b24bd301b4b9013ba4bad3f02d1a5ea5bc Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Sun, 1 Nov 2020 09:28:36 +0100 Subject: [PATCH 03/10] Small changes --- app/navigation.js | 147 +++++++++++++++++++++++----------------------- 1 file changed, 75 insertions(+), 72 deletions(-) diff --git a/app/navigation.js b/app/navigation.js index b8ca2ee..25f436e 100644 --- a/app/navigation.js +++ b/app/navigation.js @@ -1,11 +1,5 @@ -import { - createSwitchNavigator, - createAppContainer, - NavigationActions, -} from 'react-navigation'; - -import { NavigationContainer, DrawerActions, NavigationAction } from '@react-navigation/native'; - +import { NavigationContainer, DrawerActions, CommonActions } from '@react-navigation/native'; +import { React } from 'react-native'; import { createDrawerNavigator } from '@react-navigation/drawer'; import { createStackNavigator } from '@react-navigation/stack'; @@ -26,86 +20,91 @@ import EventAdmin from './ui/screens/events/EventAdminScreenConnector'; import PizzaAdmin from './ui/screens/pizza/PizzaAdminScreenConnector'; import Sidebar from './ui/components/sidebar/SidebarConnector'; -<<<<<<< HEAD -const MainNavigator = createDrawerNavigator( - { - Welcome, - Calendar, - MemberList, - Photos, - Settings, - }, - { - contentComponent: Sidebar, - } -); - -const SignedInNavigator = createStackNavigator( - { - MainNavigator, - Event, - Profile, - Pizza, - PhotoAlbum, - PhotoGallery, - Registration, - EventAdmin, - PizzaAdmin, - }, - { - headerMode: 'none', - } -); -======= const Drawer = createDrawerNavigator(); function MainNavigator() { return ( + + + + ); } -const MainNavigator = createDrawerNavigator({ - Welcome, - Calendar, - MemberList, - Photos, - Settings, -}, { - contentComponent: Sidebar, -}); - const Stack = createStackNavigator(); function SignedInNavigator() { return ( - + + + + + + + + + + ); } -const SignedInNavigator = createStackNavigator({ - MainNavigator, - Event, - Profile, - Pizza, - PhotoAlbum, - PhotoGallery, - Registration, - EventAdmin, - PizzaAdmin, -}, { - headerMode: 'none', -}); ->>>>>>> Some changeS - -const AppNavigator = createSwitchNavigator({ +function AppNavigator() { + if (state.lo) + + { isLoggedIn ? ()} + +} Splash: SplashScreen, Auth: Login, SignedIn: SignedInNavigator, @@ -119,21 +118,25 @@ function setTopLevelNavigator(navigatorRef) { navigator = navigatorRef; } -function navigate(routeName, params) { +function navigate(name, params) { navigator.dispatch( - NavigationActions.navigate({ - routeName, + CommonActions.navigate({ + name, params, - }) + }), ); } function goBack() { - navigator.dispatch(NavigationActions.back()); + navigator.dispatch( + CommonActions.goBack(), + ); } function toggleDrawer() { - navigator.dispatch(DrawerActions.toggleDrawer()); + navigator.dispatch( + DrawerActions.toggleDrawer(), + ); } export default { From 577621350f83ab517648ec90d000f2150ba99963 Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Mon, 9 Nov 2020 20:20:53 +0100 Subject: [PATCH 04/10] Little changes --- .../components/navigation/Navigation.js} | 6 +- .../navigation/NavigationConnector.js | 9 ++ ios/ThaliApp.xcodeproj/project.pbxproj | 90 +++++++++++++++++-- 3 files changed, 95 insertions(+), 10 deletions(-) rename app/{navigation.js => ui/components/navigation/Navigation.js} (98%) create mode 100644 app/ui/components/navigation/NavigationConnector.js diff --git a/app/navigation.js b/app/ui/components/navigation/Navigation.js similarity index 98% rename from app/navigation.js rename to app/ui/components/navigation/Navigation.js index 25f436e..70c502b 100644 --- a/app/navigation.js +++ b/app/ui/components/navigation/Navigation.js @@ -100,9 +100,11 @@ function SignedInNavigator() { } function AppNavigator() { - if (state.lo) + if (state.status == ) - { isLoggedIn ? ()} + { + + } } Splash: SplashScreen, diff --git a/app/ui/components/navigation/NavigationConnector.js b/app/ui/components/navigation/NavigationConnector.js new file mode 100644 index 0000000..a7a9fef --- /dev/null +++ b/app/ui/components/navigation/NavigationConnector.js @@ -0,0 +1,9 @@ +import { connect } from 'react-redux'; +import * as profileActions from '../../../actions/profile'; +import MemberView from './MemberView'; + +const mapDispatchToProps = { + loadProfile: profileActions.profile, +}; + +export default connect(() => ({}), mapDispatchToProps)(MemberView); diff --git a/ios/ThaliApp.xcodeproj/project.pbxproj b/ios/ThaliApp.xcodeproj/project.pbxproj index 0373017..1f9d35f 100644 --- a/ios/ThaliApp.xcodeproj/project.pbxproj +++ b/ios/ThaliApp.xcodeproj/project.pbxproj @@ -404,12 +404,49 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ThaliApp/Pods-ThaliApp-resources-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ThaliApp/Pods-ThaliApp-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle", ); name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ThaliApp/Pods-ThaliApp-resources-${CONFIGURATION}-output-files.xcfilelist", + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -481,12 +518,49 @@ buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ThaliApp-ThaliAppTests/Pods-ThaliApp-ThaliAppTests-resources-${CONFIGURATION}-input-files.xcfilelist", + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ThaliApp-ThaliAppTests/Pods-ThaliApp-ThaliAppTests-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle", ); name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-ThaliApp-ThaliAppTests/Pods-ThaliApp-ThaliAppTests-resources-${CONFIGURATION}-output-files.xcfilelist", + outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; From 7d4ed30b53aebfc931caf45d213c8ec929c2f24d Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Mon, 9 Nov 2020 20:21:06 +0100 Subject: [PATCH 05/10] Little changes --- __tests__/sagas/navigation.spec.js | 2 +- app/app.js | 2 +- app/sagas/navigation.js | 2 +- app/ui/components/navigation/Navigation.js | 32 +++++++++++----------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/__tests__/sagas/navigation.spec.js b/__tests__/sagas/navigation.spec.js index fa8147b..e46e3e2 100644 --- a/__tests__/sagas/navigation.spec.js +++ b/__tests__/sagas/navigation.spec.js @@ -13,7 +13,7 @@ import * as membersActions from '../../app/actions/members'; import * as welcomeActions from '../../app/actions/welcome'; import { settingsActions } from '../../app/actions/settings'; -import NavigationService from '../../app/navigation'; +import NavigationService from '../../app/ui/components/navigation/Navigation'; jest.mock('../../app/navigation', () => ({ __esModule: true, diff --git a/app/app.js b/app/app.js index 7432a31..f5819c7 100644 --- a/app/app.js +++ b/app/app.js @@ -11,7 +11,7 @@ import sagas from './sagas'; import * as sessionActions from './actions/session'; import * as deepLinkingActions from './actions/deepLinking'; import { register } from './actions/pushNotifications'; -import NavigationService from './navigation'; +import NavigationService from './ui/components/navigation/Navigation'; const { UIManager } = NativeModules; diff --git a/app/sagas/navigation.js b/app/sagas/navigation.js index 255ed21..24f81b3 100644 --- a/app/sagas/navigation.js +++ b/app/sagas/navigation.js @@ -10,7 +10,7 @@ import * as calendarActions from '../actions/calendar'; import * as membersActions from '../actions/members'; import * as welcomeActions from '../actions/welcome'; import { settingsActions } from '../actions/settings'; -import NavigationService from '../navigation'; +import NavigationService from '../ui/components/navigation/Navigation'; import * as photosActions from '../actions/photos'; function* navigate(routeName) { diff --git a/app/ui/components/navigation/Navigation.js b/app/ui/components/navigation/Navigation.js index 70c502b..709c956 100644 --- a/app/ui/components/navigation/Navigation.js +++ b/app/ui/components/navigation/Navigation.js @@ -3,22 +3,22 @@ import { React } from 'react-native'; import { createDrawerNavigator } from '@react-navigation/drawer'; import { createStackNavigator } from '@react-navigation/stack'; -import Login from './ui/screens/login/LoginScreenConnector'; -import Welcome from './ui/screens/welcome/WelcomeScreenConnector'; -import Event from './ui/screens/events/EventScreenConnector'; -import Calendar from './ui/screens/events/CalendarScreenConnector'; -import Profile from './ui/screens/profile/ProfileScreenConnector'; -import Pizza from './ui/screens/pizza/PizzaScreenConnector'; -import Registration from './ui/screens/events/RegistrationScreenConnector'; -import MemberList from './ui/screens/memberList/MemberListScreenConnector'; -import Photos from './ui/screens/photos/AlbumsOverviewScreenConnector'; -import PhotoAlbum from './ui/screens/photos/AlbumDetailScreenConnector'; -import PhotoGallery from './ui/screens/photos/AlbumGalleryScreenConnector'; -import SplashScreen from './ui/screens/splash/SplashScreen'; -import Settings from './ui/screens/settings/SettingsScreenConnector'; -import EventAdmin from './ui/screens/events/EventAdminScreenConnector'; -import PizzaAdmin from './ui/screens/pizza/PizzaAdminScreenConnector'; -import Sidebar from './ui/components/sidebar/SidebarConnector'; +import Login from '../../screens/login/LoginScreenConnector'; +import Welcome from '../../screens/welcome/WelcomeScreenConnector'; +import Event from '../../screens/events/EventScreenConnector'; +import Calendar from '../../screens/events/CalendarScreenConnector'; +import Profile from '../../screens/profile/ProfileScreenConnector'; +import Pizza from '../../screens/pizza/PizzaScreenConnector'; +import Registration from '../../screens/events/RegistrationScreenConnector'; +import MemberList from '../../screens/memberList/MemberListScreenConnector'; +import Photos from '../../screens/photos/AlbumsOverviewScreenConnector'; +import PhotoAlbum from '../../screens/photos/AlbumDetailScreenConnector'; +import PhotoGallery from '../../screens/photos/AlbumGalleryScreenConnector'; +import SplashScreen from '../../screens/splash/SplashScreen'; +import Settings from '../../screens/settings/SettingsScreenConnector'; +import EventAdmin from '../../screens/events/EventAdminScreenConnector'; +import PizzaAdmin from '../../screens/pizza/PizzaAdminScreenConnector'; +import Sidebar from '../sidebar/SidebarConnector'; const Drawer = createDrawerNavigator(); From e122b7c8cf3cbd0923b4a918270ec9fa3d9fd2cc Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Mon, 16 Nov 2020 20:47:50 +0100 Subject: [PATCH 06/10] Update react-navigation --- app/app.js | 13 +- app/sagas/navigation.js | 15 +- app/ui/components/navigation/Navigation.js | 150 +++++------------- .../navigation/NavigationConnector.js | 12 +- .../components/navigation/RootNavigation.js | 16 ++ .../components/searchHeader/SearchHeader.js | 6 +- .../standardHeader/StandardHeader.js | 2 +- app/ui/screens/splash/SplashScreen.js | 15 -- app/ui/screens/splash/style/SplashScreen.js | 19 --- package.json | 3 +- yarn.lock | 11 +- 11 files changed, 87 insertions(+), 175 deletions(-) create mode 100644 app/ui/components/navigation/RootNavigation.js delete mode 100644 app/ui/screens/splash/SplashScreen.js delete mode 100644 app/ui/screens/splash/style/SplashScreen.js diff --git a/app/app.js b/app/app.js index f5819c7..8adc537 100644 --- a/app/app.js +++ b/app/app.js @@ -5,13 +5,18 @@ import { Provider } from 'react-redux'; import createSagaMiddleware from 'redux-saga'; import messaging from '@react-native-firebase/messaging'; +import { select } from 'redux-saga/effects'; import reducers from './reducers'; import sagas from './sagas'; import * as sessionActions from './actions/session'; import * as deepLinkingActions from './actions/deepLinking'; import { register } from './actions/pushNotifications'; -import NavigationService from './ui/components/navigation/Navigation'; +import Navigation from './ui/components/navigation/NavigationConnector'; +import Colors from './ui/style/Colors'; +import styles from './ui/screens/login/style/LoginScreen'; +import Button from './ui/components/button/Button'; +import { loggedInSelector } from './selectors/session'; const { UIManager } = NativeModules; @@ -96,11 +101,7 @@ class Main extends Component { render() { return ( - { - NavigationService.setTopLevelNavigator(navigatorRef); - }} - /> + ); } diff --git a/app/sagas/navigation.js b/app/sagas/navigation.js index 24f81b3..ddfd26e 100644 --- a/app/sagas/navigation.js +++ b/app/sagas/navigation.js @@ -5,24 +5,23 @@ import * as eventActions from '../actions/event'; import * as profileActions from '../actions/profile'; import * as pizzaActions from '../actions/pizza'; import * as registrationActions from '../actions/registration'; -import * as sessionActions from '../actions/session'; import * as calendarActions from '../actions/calendar'; import * as membersActions from '../actions/members'; import * as welcomeActions from '../actions/welcome'; import { settingsActions } from '../actions/settings'; -import NavigationService from '../ui/components/navigation/Navigation'; +import * as RootNavigation from '../ui/components/navigation/RootNavigation'; import * as photosActions from '../actions/photos'; function* navigate(routeName) { - yield call(NavigationService.navigate, routeName); + yield call(RootNavigation.navigate, routeName); } function* back() { - yield call(NavigationService.goBack); + yield call(RootNavigation.goBack); } function* toggleDrawer() { - yield call(NavigationService.toggleDrawer); + yield call(RootNavigation.toggleDrawer); } function openWebsite({ payload: url }) { @@ -47,10 +46,4 @@ export default function* navigationSaga() { yield takeEvery(photosActions.PHOTOS_ALBUMS_OPEN, navigate, 'Photos'); yield takeEvery(photosActions.PHOTOS_ALBUM_OPEN, navigate, 'PhotoAlbum'); yield takeEvery(photosActions.PHOTOS_GALLERY_OPEN, navigate, 'PhotoGallery'); - yield takeEvery(sessionActions.SIGNED_IN, navigate, 'SignedIn'); - yield takeEvery( - [sessionActions.TOKEN_INVALID, sessionActions.SIGN_OUT], - navigate, - 'Auth' - ); } diff --git a/app/ui/components/navigation/Navigation.js b/app/ui/components/navigation/Navigation.js index 709c956..2c60e73 100644 --- a/app/ui/components/navigation/Navigation.js +++ b/app/ui/components/navigation/Navigation.js @@ -1,8 +1,10 @@ -import { NavigationContainer, DrawerActions, CommonActions } from '@react-navigation/native'; -import { React } from 'react-native'; +import React, { Component } from 'react'; +import { NavigationContainer } from '@react-navigation/native'; import { createDrawerNavigator } from '@react-navigation/drawer'; import { createStackNavigator } from '@react-navigation/stack'; +import PropTypes from 'prop-types'; +import { navigationRef } from './RootNavigation'; import Login from '../../screens/login/LoginScreenConnector'; import Welcome from '../../screens/welcome/WelcomeScreenConnector'; import Event from '../../screens/events/EventScreenConnector'; @@ -14,7 +16,6 @@ import MemberList from '../../screens/memberList/MemberListScreenConnector'; import Photos from '../../screens/photos/AlbumsOverviewScreenConnector'; import PhotoAlbum from '../../screens/photos/AlbumDetailScreenConnector'; import PhotoGallery from '../../screens/photos/AlbumGalleryScreenConnector'; -import SplashScreen from '../../screens/splash/SplashScreen'; import Settings from '../../screens/settings/SettingsScreenConnector'; import EventAdmin from '../../screens/events/EventAdminScreenConnector'; import PizzaAdmin from '../../screens/pizza/PizzaAdminScreenConnector'; @@ -25,29 +26,16 @@ const Drawer = createDrawerNavigator(); function MainNavigator() { return ( { + return ; + }} > - - - - - + + + + + ); } @@ -57,94 +45,40 @@ const Stack = createStackNavigator(); function SignedInNavigator() { return ( - - - - - - - - - + + + + + + + + + ); } -function AppNavigator() { - if (state.status == ) - - { - - } - -} - Splash: SplashScreen, - Auth: Login, - SignedIn: SignedInNavigator, -}); - -const AppContainer = `${{ AppNavigator }}`; - -let navigator; - -function setTopLevelNavigator(navigatorRef) { - navigator = navigatorRef; -} - -function navigate(name, params) { - navigator.dispatch( - CommonActions.navigate({ - name, - params, - }), - ); -} - -function goBack() { - navigator.dispatch( - CommonActions.goBack(), - ); -} - -function toggleDrawer() { - navigator.dispatch( - DrawerActions.toggleDrawer(), +const Navigation = (props) => { + return ( + + {props.loggedIn ? ( + <> + + + ) : ( + <> + + + )} + ); -} +}; -export default { - AppContainer, - navigate, - goBack, - toggleDrawer, - setTopLevelNavigator, +Navigation.propTypes = { + loggedIn: PropTypes.bool.isRequired, }; + +export default Navigation; diff --git a/app/ui/components/navigation/NavigationConnector.js b/app/ui/components/navigation/NavigationConnector.js index a7a9fef..c3e7475 100644 --- a/app/ui/components/navigation/NavigationConnector.js +++ b/app/ui/components/navigation/NavigationConnector.js @@ -1,9 +1,9 @@ import { connect } from 'react-redux'; -import * as profileActions from '../../../actions/profile'; -import MemberView from './MemberView'; +import Navigation from './Navigation'; +import { loggedInSelector } from '../../../selectors/session'; -const mapDispatchToProps = { - loadProfile: profileActions.profile, -}; +const mapStateToProps = (state) => ({ + loggedIn: loggedInSelector(state), +}); -export default connect(() => ({}), mapDispatchToProps)(MemberView); +export default connect(mapStateToProps)(Navigation); diff --git a/app/ui/components/navigation/RootNavigation.js b/app/ui/components/navigation/RootNavigation.js new file mode 100644 index 0000000..ce588a8 --- /dev/null +++ b/app/ui/components/navigation/RootNavigation.js @@ -0,0 +1,16 @@ +import * as React from 'react'; +import { DrawerActions } from '@react-navigation/routers'; + +export const navigationRef = React.createRef(); + +export function navigate(name, params) { + navigationRef.current.navigate(name, params); +} + +export function goBack() { + navigationRef.current.goBack(); +} + +export function toggleDrawer() { + navigationRef.current.dispatch(DrawerActions.toggleDrawer()); +} diff --git a/app/ui/components/searchHeader/SearchHeader.js b/app/ui/components/searchHeader/SearchHeader.js index d3a5a07..9bc98e9 100644 --- a/app/ui/components/searchHeader/SearchHeader.js +++ b/app/ui/components/searchHeader/SearchHeader.js @@ -11,7 +11,7 @@ import { } from 'react-native'; import PropTypes from 'prop-types'; import StatusBar from '@react-native-community/status-bar'; -import { NavigationEvents } from 'react-navigation'; +import { NavigationEvents } from '@react-navigation/native'; import styles from './style/SearchHeader'; import Colors from '../../style/Colors'; @@ -141,10 +141,6 @@ class SearchHeader extends Component { const { isAnimating, isSearching, scaleValue } = this.state; return ( - ( - - - - -); - -export default SplashScreen; diff --git a/app/ui/screens/splash/style/SplashScreen.js b/app/ui/screens/splash/style/SplashScreen.js deleted file mode 100644 index 93ce215..0000000 --- a/app/ui/screens/splash/style/SplashScreen.js +++ /dev/null @@ -1,19 +0,0 @@ -import Stylesheet from '../../../style/StyleSheet'; -import Colors from '../../../style/Colors'; - -const styles = Stylesheet.create({ - wrapper: { - flex: 1, - justifyContent: 'center', - backgroundColor: Colors.magenta, - }, - logo: { - width: 260, - height: 108, - marginBottom: 72, - resizeMode: 'contain', - alignSelf: 'center', - }, -}); - -export default styles; diff --git a/package.json b/package.json index a6505e3..eec6141 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "@react-native-firebase/app": "^8.4.6", "@react-native-firebase/iid": "^7.4.9", "@react-native-firebase/messaging": "^7.9.3", + "@react-navigation/compat": "^5.3.9", "@react-navigation/drawer": "^5.9.3", "@react-navigation/native": "^5.7.6", "@react-navigation/stack": "^5.9.3", @@ -78,8 +79,8 @@ "react-native-reanimated": "^1.13.1", "react-native-render-html": "^4.2.4", "react-native-safe-area-context": "^3.1.8", - "react-native-share": "^4.0.4", "react-native-screens": "^2.12.0", + "react-native-share": "^4.0.4", "react-native-snackbar": "^2.2.3", "react-native-vector-icons": "^7.1.0", "react-native-webview": "^10.10.0", diff --git a/yarn.lock b/yarn.lock index c72296c..4f9f7ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1944,9 +1944,14 @@ integrity sha512-cRIPVKQax/MicfxV6SDKUkI0buFmXXL/5lqnstA4b+VgGecj6DEAgXTXJL7iKXPVq7DWoB6mSU2glZ77GcS+ow== "@react-native-firebase/messaging@^7.9.3": - version "7.9.2" - resolved "https://registry.yarnpkg.com/@react-native-firebase/messaging/-/messaging-7.9.2.tgz#f5946ce0da4c1454df4701de7284d52a4ccc8d5b" - integrity sha512-xK9oRkQAxJ5+9e3W9EUnxqhecA2iwZb4OCYPWyO5BzldIMa1B4UdYLHDHU8oYpgsefqS51bPDdczC0yn+/8RTA== + version "8.0.1" + resolved "https://registry.yarnpkg.com/@react-native-firebase/messaging/-/messaging-8.0.1.tgz#845a31ed7464bf170823d0148056fa9f9c6d3f2e" + integrity sha512-Pq6oPZjOxPgUvnkT2fJvPxM2Ca/Nc5Pk9EqCwE3bDGKjyXfLW7qPRN73FBOzr2+AU+UxNqwXgfRkoYcBZwLQFA== + +"@react-navigation/compat@^5.3.9": + version "5.3.9" + resolved "https://registry.yarnpkg.com/@react-navigation/compat/-/compat-5.3.9.tgz#4523e0207a089df71cbc29b45e001ecda6200aa3" + integrity sha512-ZVidNiq8wXdHcQwUKLCnZwN9xTAIXf53zktnnU06Dc6rhx42lKU9kwvGuFZrWhc3ppl25iZncZ0ZNngE17S8EA== "@react-navigation/core@^5.12.5": version "5.12.5" From a39ef42e3ab99d640d33ac5ea20246624ad1cb36 Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Mon, 16 Nov 2020 20:52:17 +0100 Subject: [PATCH 07/10] Linter --- app/app.js | 5 ----- app/ui/components/navigation/Navigation.js | 2 +- app/ui/components/navigation/RootNavigation.js | 2 +- app/ui/components/searchHeader/SearchHeader.js | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/app.js b/app/app.js index 8adc537..8111eeb 100644 --- a/app/app.js +++ b/app/app.js @@ -5,7 +5,6 @@ import { Provider } from 'react-redux'; import createSagaMiddleware from 'redux-saga'; import messaging from '@react-native-firebase/messaging'; -import { select } from 'redux-saga/effects'; import reducers from './reducers'; import sagas from './sagas'; @@ -13,10 +12,6 @@ import * as sessionActions from './actions/session'; import * as deepLinkingActions from './actions/deepLinking'; import { register } from './actions/pushNotifications'; import Navigation from './ui/components/navigation/NavigationConnector'; -import Colors from './ui/style/Colors'; -import styles from './ui/screens/login/style/LoginScreen'; -import Button from './ui/components/button/Button'; -import { loggedInSelector } from './selectors/session'; const { UIManager } = NativeModules; diff --git a/app/ui/components/navigation/Navigation.js b/app/ui/components/navigation/Navigation.js index 2c60e73..e080903 100644 --- a/app/ui/components/navigation/Navigation.js +++ b/app/ui/components/navigation/Navigation.js @@ -1,4 +1,4 @@ -import React, { Component } from 'react'; +import React from 'react'; import { NavigationContainer } from '@react-navigation/native'; import { createDrawerNavigator } from '@react-navigation/drawer'; import { createStackNavigator } from '@react-navigation/stack'; diff --git a/app/ui/components/navigation/RootNavigation.js b/app/ui/components/navigation/RootNavigation.js index ce588a8..c6c4365 100644 --- a/app/ui/components/navigation/RootNavigation.js +++ b/app/ui/components/navigation/RootNavigation.js @@ -1,5 +1,5 @@ import * as React from 'react'; -import { DrawerActions } from '@react-navigation/routers'; +import { DrawerActions } from '@react-navigation/native'; export const navigationRef = React.createRef(); diff --git a/app/ui/components/searchHeader/SearchHeader.js b/app/ui/components/searchHeader/SearchHeader.js index 9bc98e9..a6acba9 100644 --- a/app/ui/components/searchHeader/SearchHeader.js +++ b/app/ui/components/searchHeader/SearchHeader.js @@ -11,7 +11,6 @@ import { } from 'react-native'; import PropTypes from 'prop-types'; import StatusBar from '@react-native-community/status-bar'; -import { NavigationEvents } from '@react-navigation/native'; import styles from './style/SearchHeader'; import Colors from '../../style/Colors'; From 32be0ece3d42b5d6399d142e400e9b5b389640cb Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Mon, 16 Nov 2020 20:55:19 +0100 Subject: [PATCH 08/10] Fix firebase --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index eec6141..e08258a 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@react-native-community/status-bar": "^1.0.3", "@react-native-firebase/app": "^8.4.6", "@react-native-firebase/iid": "^7.4.9", - "@react-native-firebase/messaging": "^7.9.3", + "@react-native-firebase/messaging": "^7.9.2", "@react-navigation/compat": "^5.3.9", "@react-navigation/drawer": "^5.9.3", "@react-navigation/native": "^5.7.6", diff --git a/yarn.lock b/yarn.lock index 4f9f7ac..277d50b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1943,10 +1943,10 @@ resolved "https://registry.yarnpkg.com/@react-native-firebase/iid/-/iid-7.4.9.tgz#9a8281b7cbb46d9191c40cfb0ae141fc219d99f0" integrity sha512-cRIPVKQax/MicfxV6SDKUkI0buFmXXL/5lqnstA4b+VgGecj6DEAgXTXJL7iKXPVq7DWoB6mSU2glZ77GcS+ow== -"@react-native-firebase/messaging@^7.9.3": - version "8.0.1" - resolved "https://registry.yarnpkg.com/@react-native-firebase/messaging/-/messaging-8.0.1.tgz#845a31ed7464bf170823d0148056fa9f9c6d3f2e" - integrity sha512-Pq6oPZjOxPgUvnkT2fJvPxM2Ca/Nc5Pk9EqCwE3bDGKjyXfLW7qPRN73FBOzr2+AU+UxNqwXgfRkoYcBZwLQFA== +"@react-native-firebase/messaging@^7.9.2": + version "7.9.2" + resolved "https://registry.yarnpkg.com/@react-native-firebase/messaging/-/messaging-7.9.2.tgz#f5946ce0da4c1454df4701de7284d52a4ccc8d5b" + integrity sha512-xK9oRkQAxJ5+9e3W9EUnxqhecA2iwZb4OCYPWyO5BzldIMa1B4UdYLHDHU8oYpgsefqS51bPDdczC0yn+/8RTA== "@react-navigation/compat@^5.3.9": version "5.3.9" From f774c00941992ba8fe9b26739f2278165247a610 Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Tue, 17 Nov 2020 08:37:59 +0100 Subject: [PATCH 09/10] Test changes --- __mocks__/fileMock.js | 1 + __mocks__/styleMock.js | 1 + __tests__/sagas/deepLinking.spec.js | 2 +- __tests__/sagas/event.spec.js | 2 +- __tests__/sagas/navigation.spec.js | 81 +++++++++---------- __tests__/sagas/registration.spec.js | 2 +- __tests__/sagas/session.spec.js | 2 +- __tests__/setup.js | 15 ++++ .../__snapshots__/ErrorScreen.spec.js.snap | 6 +- .../components/memberView/MemberView.spec.js | 2 +- .../__snapshots__/Sidebar.spec.js.snap | 6 +- .../standardHeader/StandardHeader.spec.js | 3 +- package.json | 6 +- 13 files changed, 67 insertions(+), 62 deletions(-) create mode 100644 __mocks__/fileMock.js create mode 100644 __mocks__/styleMock.js diff --git a/__mocks__/fileMock.js b/__mocks__/fileMock.js new file mode 100644 index 0000000..86059f3 --- /dev/null +++ b/__mocks__/fileMock.js @@ -0,0 +1 @@ +module.exports = 'test-file-stub'; diff --git a/__mocks__/styleMock.js b/__mocks__/styleMock.js new file mode 100644 index 0000000..f053ebf --- /dev/null +++ b/__mocks__/styleMock.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/__tests__/sagas/deepLinking.spec.js b/__tests__/sagas/deepLinking.spec.js index 0030377..0e646c3 100644 --- a/__tests__/sagas/deepLinking.spec.js +++ b/__tests__/sagas/deepLinking.spec.js @@ -13,7 +13,7 @@ import * as eventActions from '../../app/actions/event'; import { loggedInSelector } from '../../app/selectors/session'; -jest.mock('../../app/navigation', () => ({ +jest.mock('../../app/ui/components/navigation/RootNavigation', () => ({ navigate: jest.fn(), })); diff --git a/__tests__/sagas/event.spec.js b/__tests__/sagas/event.spec.js index 236a345..27440bb 100644 --- a/__tests__/sagas/event.spec.js +++ b/__tests__/sagas/event.spec.js @@ -18,7 +18,7 @@ jest.mock('../../app/utils/url', () => ({ apiRequest: jest.fn(() => {}), })); -jest.mock('../../app/navigation', () => ({ +jest.mock('../../app/ui/components/navigation/RootNavigation', () => ({ navigate: jest.fn(), })); diff --git a/__tests__/sagas/navigation.spec.js b/__tests__/sagas/navigation.spec.js index e46e3e2..5c0414f 100644 --- a/__tests__/sagas/navigation.spec.js +++ b/__tests__/sagas/navigation.spec.js @@ -13,15 +13,30 @@ import * as membersActions from '../../app/actions/members'; import * as welcomeActions from '../../app/actions/welcome'; import { settingsActions } from '../../app/actions/settings'; -import NavigationService from '../../app/ui/components/navigation/Navigation'; - -jest.mock('../../app/navigation', () => ({ - __esModule: true, - default: { - goBack: jest.fn(), - toggleDrawer: jest.fn(), - navigate: jest.fn(), - }, +import { + goBack, + toggleDrawer, + navigate, +} from '../../app/ui/components/navigation/RootNavigation'; + +jest.mock('../../app/ui/components/navigation/RootNavigation', () => ({ + goBack: jest.fn(), + toggleDrawer: jest.fn(), + navigate: jest.fn(), +})); + +jest.mock('react-native-vector-icons/MaterialIcons', () => ({ + propTypes: jest.fn(() => 'Icon'), + defaultProps: jest.fn(), + create: jest.fn(), +})); + +jest.mock('react-native-vector-icons/MaterialCommunityIcons', () => ({ + CommunityIcon: 'CommunityIcon', +})); + +jest.mock('react-native-snackbar', () => ({ + Snackbar: jest.fn(), })); describe('navigation saga', () => { @@ -31,7 +46,7 @@ describe('navigation saga', () => { .dispatch(navigationActions.goBack()) .silentRun() .then(() => { - expect(NavigationService.goBack).toBeCalled(); + expect(goBack).toBeCalled(); })); it('should go back when a registration is saved', () => @@ -39,7 +54,7 @@ describe('navigation saga', () => { .dispatch(registrationActions.success()) .silentRun() .then(() => { - expect(NavigationService.goBack).toBeCalled(); + expect(goBack).toBeCalled(); })); }); @@ -49,7 +64,7 @@ describe('navigation saga', () => { .dispatch(navigationActions.toggleDrawer()) .silentRun() .then(() => { - expect(NavigationService.toggleDrawer).toBeCalled(); + expect(toggleDrawer).toBeCalled(); })); }); @@ -59,7 +74,7 @@ describe('navigation saga', () => { .dispatch(welcomeActions.open()) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Welcome'); + expect(navigate).toBeCalledWith('Welcome'); })); it('should open the settings screen', () => @@ -67,7 +82,7 @@ describe('navigation saga', () => { .dispatch(settingsActions.open()) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Settings'); + expect(navigate).toBeCalledWith('Settings'); })); it('should open the calendar screen', () => @@ -75,7 +90,7 @@ describe('navigation saga', () => { .dispatch(calendarActions.open()) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Calendar'); + expect(navigate).toBeCalledWith('Calendar'); })); it('should open the members screen', () => @@ -83,7 +98,7 @@ describe('navigation saga', () => { .dispatch(membersActions.open()) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('MemberList'); + expect(navigate).toBeCalledWith('MemberList'); })); it('should open the event screen', () => @@ -91,7 +106,7 @@ describe('navigation saga', () => { .dispatch(eventActions.open()) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Event'); + expect(navigate).toBeCalledWith('Event'); })); it('should open the event admin screen', () => @@ -99,7 +114,7 @@ describe('navigation saga', () => { .dispatch(eventActions.admin()) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('EventAdmin'); + expect(navigate).toBeCalledWith('EventAdmin'); })); it('should open the profile screen', () => @@ -107,7 +122,7 @@ describe('navigation saga', () => { .dispatch(profileActions.profile()) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Profile'); + expect(navigate).toBeCalledWith('Profile'); })); it('should open the registration screen', () => @@ -115,7 +130,7 @@ describe('navigation saga', () => { .dispatch(registrationActions.retrieveFields(1)) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Registration'); + expect(navigate).toBeCalledWith('Registration'); })); it('should open the pizza screen', () => @@ -123,31 +138,7 @@ describe('navigation saga', () => { .dispatch(pizzaActions.retrievePizzaInfo()) .silentRun() .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Pizza'); - })); - - it('should switch to the signed in navigator', () => - expectSaga(navigationSaga) - .dispatch(sessionActions.signedIn('user', 'token')) - .silentRun() - .then(() => { - expect(NavigationService.navigate).toBeCalledWith('SignedIn'); - })); - - it('should sign out with invalid token', () => - expectSaga(navigationSaga) - .dispatch(sessionActions.tokenInvalid()) - .silentRun() - .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Auth'); - })); - - it('should sign out on a sign out action', () => - expectSaga(navigationSaga) - .dispatch(sessionActions.signOut()) - .silentRun() - .then(() => { - expect(NavigationService.navigate).toBeCalledWith('Auth'); + expect(navigate).toBeCalledWith('Pizza'); })); }); }); diff --git a/__tests__/sagas/registration.spec.js b/__tests__/sagas/registration.spec.js index 1810691..2091c5c 100644 --- a/__tests__/sagas/registration.spec.js +++ b/__tests__/sagas/registration.spec.js @@ -18,7 +18,7 @@ jest.mock('react-native-snackbar', () => ({ dismiss: jest.fn(), })); -jest.mock('../../app/navigation', () => ({ +jest.mock('../../app/ui/components/navigation/RootNavigation', () => ({ navigate: jest.fn(), goBack: jest.fn(), })); diff --git a/__tests__/sagas/session.spec.js b/__tests__/sagas/session.spec.js index 9c84d64..4fa3d57 100644 --- a/__tests__/sagas/session.spec.js +++ b/__tests__/sagas/session.spec.js @@ -30,7 +30,7 @@ jest.mock('../../app/selectors/session', () => ({ tokenSelector: () => 'abc123', })); -jest.mock('../../app/navigation', () => ({ +jest.mock('../../app/ui/components/navigation/RootNavigation', () => ({ navigate: jest.fn(), })); diff --git a/__tests__/setup.js b/__tests__/setup.js index cb155b9..efbd7b8 100644 --- a/__tests__/setup.js +++ b/__tests__/setup.js @@ -1,5 +1,6 @@ import { NativeModules } from 'react-native'; import * as ReactNative from 'react-native'; +import 'react-native-gesture-handler/jestSetup'; NativeModules.RNShare = {}; @@ -13,6 +14,20 @@ NativeModules.RNCStatusBarManager = { setTranslucent: jest.fn(), }; +jest.mock('react-native-reanimated', () => { + // eslint-disable-next-line global-require + const Reanimated = require('react-native-reanimated/mock'); + + // The mock for `call` immediately calls the callback which is incorrect + // So we override it with a no-op + Reanimated.default.call = () => {}; + + return Reanimated; +}); + +// Silence the warning: Animated: `useNativeDriver` is not supported because the native animated module is missing +jest.mock('react-native/Libraries/Animated/src/NativeAnimatedHelper'); + jest.mock('react-native-fs', () => ({ downloadFile: jest.fn(), })); diff --git a/__tests__/ui/components/errorScreen/__snapshots__/ErrorScreen.spec.js.snap b/__tests__/ui/components/errorScreen/__snapshots__/ErrorScreen.spec.js.snap index df00490..dc88b11 100644 --- a/__tests__/ui/components/errorScreen/__snapshots__/ErrorScreen.spec.js.snap +++ b/__tests__/ui/components/errorScreen/__snapshots__/ErrorScreen.spec.js.snap @@ -12,11 +12,7 @@ exports[`ErrorScreen component renders correctly 1`] = ` } > ({ +jest.mock('@react-navigation/compat', () => ({ withNavigation: (component) => component, })); diff --git a/__tests__/ui/components/navigator/__snapshots__/Sidebar.spec.js.snap b/__tests__/ui/components/navigator/__snapshots__/Sidebar.spec.js.snap index 0d4c2de..b28b7e2 100644 --- a/__tests__/ui/components/navigator/__snapshots__/Sidebar.spec.js.snap +++ b/__tests__/ui/components/navigator/__snapshots__/Sidebar.spec.js.snap @@ -41,11 +41,7 @@ exports[`Sidebar component renders correctly 1`] = ` > ({ +jest.mock('@react-navigation/compat', () => ({ + createNavigatorFactory: (component) => component, withNavigation: (component) => component, })); diff --git a/package.json b/package.json index e08258a..a6a7d58 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,11 @@ ], "transformIgnorePatterns": [ "node_modules/(?!(react-native|@react-native-community|react-navigation|react-navigation-drawer|react-navigation-stack|@sentry|react-native-gesture-handler|react-native-vector-icons|react-native-linear-gradient|@react-native-firebase|react-native-image-crop-picker|react-native-reanimated|react-native-iphone-x-helper|react-native-render-html|react-native-webview|react-native-share|react-native-image-zoom-viewer|react-native-image-pan-zoom|react-native-add-calendar-event)/)" - ] + ], + "moduleNameMapper": { + "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js", + "\\.(css|less)$": "/__mocks__/styleMock.js" + } }, "prettier": { "singleQuote": true, From 0bbeeee9d869eac48673fca46f2c5adbfe6718b7 Mon Sep 17 00:00:00 2001 From: Lars van Rhijn Date: Tue, 17 Nov 2020 08:41:25 +0100 Subject: [PATCH 10/10] Fixed linting --- __tests__/sagas/navigation.spec.js | 1 - 1 file changed, 1 deletion(-) diff --git a/__tests__/sagas/navigation.spec.js b/__tests__/sagas/navigation.spec.js index 5c0414f..716dd47 100644 --- a/__tests__/sagas/navigation.spec.js +++ b/__tests__/sagas/navigation.spec.js @@ -7,7 +7,6 @@ import * as eventActions from '../../app/actions/event'; import * as profileActions from '../../app/actions/profile'; import * as pizzaActions from '../../app/actions/pizza'; import * as registrationActions from '../../app/actions/registration'; -import * as sessionActions from '../../app/actions/session'; import * as calendarActions from '../../app/actions/calendar'; import * as membersActions from '../../app/actions/members'; import * as welcomeActions from '../../app/actions/welcome';