Commit e00c479c authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'refactor-dispatch-props' into 'master'

Refactor some stuff

Closes #96, #95, and #94

See merge request !234
parents 40a59f7d 23d03d29
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
"prefer-destructuring": 0, "prefer-destructuring": 0,
"react/jsx-filename-extension": 0, "react/jsx-filename-extension": 0,
"react/prefer-stateless-function": 1, "react/prefer-stateless-function": 1,
"import/prefer-default-export": 1 "import/prefer-default-export": 1,
"no-multi-str": 0
}, },
"settings": { "settings": {
"import/resolver": { "import/resolver": {
......
...@@ -49,11 +49,9 @@ build android: ...@@ -49,11 +49,9 @@ build android:
- $CI_PROJECT_DIR/.gradle/wrapper/ - $CI_PROJECT_DIR/.gradle/wrapper/
- $CI_PROJECT_DIR/.gradle/caches/ - $CI_PROJECT_DIR/.gradle/caches/
before_script: before_script:
- sysctl fs.inotify.max_user_watches=524288
- set +o pipefail - set +o pipefail
- yes | /opt/android-sdk-linux/tools/bin/sdkmanager --licenses - yes | /opt/android-sdk-linux/tools/bin/sdkmanager --licenses
- set -o pipefail - set -o pipefail
- apk update && apk add git
- yarn install - yarn install
script: script:
- echo $SENTRY_PROPS | base64 -d > ./android/sentry.properties - echo $SENTRY_PROPS | base64 -d > ./android/sentry.properties
......
...@@ -3,10 +3,6 @@ ...@@ -3,10 +3,6 @@
exports[`translations should expose the translations 1`] = ` exports[`translations should expose the translations 1`] = `
Object { Object {
"nl": Object { "nl": Object {
"app/App": Object {
"Dismiss": "Sluiten",
"Open": "Openen",
},
"components/errorScreen/ErrorScreen": Object { "components/errorScreen/ErrorScreen": Object {
"Try again later.": "Probeer het later opnieuw.", "Try again later.": "Probeer het later opnieuw.",
}, },
...@@ -61,7 +57,7 @@ Object { ...@@ -61,7 +57,7 @@ Object {
"Cancel registration": "Afmelden", "Cancel registration": "Afmelden",
"Cancel registration?": "Afmelden?", "Cancel registration?": "Afmelden?",
"Cancellation deadline": "Afmelddeadline", "Cancellation deadline": "Afmelddeadline",
"Cancellation isn't possible anymore without having to pay the full costs of €{{fine}}. Also note that you will be unable to re-register.": "Afmelden is niet meer mogelijk zonder de volledige kosten van €{{fine}} te betalen. Let op: je kunt je hierna niet meer aanmelden. ", "Cancellation isn't possible anymore without having to pay the full costs of €{{fine}}. Also note that you will be unable to re-register.": "Afmelden is niet meer mogelijk zonder de volledige kosten van €{{fine}} te betalen. Let op: je kunt je hierna niet meer aanmelden.",
"Could not load the event...": "Kan het evenement niet laden...", "Could not load the event...": "Kan het evenement niet laden...",
"From": "Van", "From": "Van",
"Location": "Locatie", "Location": "Locatie",
...@@ -118,21 +114,27 @@ Object { ...@@ -118,21 +114,27 @@ Object {
"There is currently no event for which you can order food.": "Er is geen evenement waarvoor je eten kunt bestellen.", "There is currently no event for which you can order food.": "Er is geen evenement waarvoor je eten kunt bestellen.",
"You did not place an order.": "Je hebt nog geen bestelling geplaatst.", "You did not place an order.": "Je hebt nog geen bestelling geplaatst.",
}, },
"screens/profile/ProfileScreen": Object { "screens/profile/AchievementSection": Object {
"About": "Over",
"Achievements for Thalia": "Verdiensten voor Thalia", "Achievements for Thalia": "Verdiensten voor Thalia",
"Birthday": "Verjaardag",
"Chair": "Voorzitter", "Chair": "Voorzitter",
"Societies": "Gezelschappen",
"today": "heden",
},
"screens/profile/DescriptionSection": Object {
"About": "Over",
"This member has not written a description yet.": "Dit lid heeft nog geen beschrijving geschreven.",
},
"screens/profile/PersonalInfoSection": Object {
"Birthday": "Verjaardag",
"Cohort": "Cohort", "Cohort": "Cohort",
"Computing science": "Informatica", "Computing science": "Informatica",
"Information sciences": "Informatiekunde", "Information sciences": "Informatiekunde",
"Personal information": "Persoonlijke gegevens", "Personal information": "Persoonlijke gegevens",
"Societies": "Gezelschappen",
"Sorry! We couldn't load any data.": "Sorry! We konden geen gegevens laden.",
"Study programme": "Studie", "Study programme": "Studie",
"This member has not written a description yet.": "Dit lid heeft nog geen beschrijving geschreven.",
"Website": "Website", "Website": "Website",
"today": "heden", },
"screens/profile/ProfileScreen": Object {
"Sorry! We couldn't load any data.": "Sorry! We konden geen gegevens laden.",
}, },
"screens/settings/NotificationsSection": Object { "screens/settings/NotificationsSection": Object {
"(required)": "(verplicht)", "(required)": "(verplicht)",
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.thaliapp"> package="com.thaliapp"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission tools:node="remove" android:name="android.permission.READ_PHONE_STATE" />
<uses-permission tools:node="remove" android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission tools:node="remove" android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application <application
android:name=".MainApplication" android:name=".MainApplication"
......
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.thaliapp"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission tools:node="remove" android:name="android.permission.SYSTEM_ALERT_WINDOW" />
</manifest>
export const BACK = 'NAVIGATE_BACK'; export const BACK = 'NAVIGATE_BACK';
export const TOGGLE_DRAWER = 'NAVIGATE_TOGGLE_DRAWER'; export const TOGGLE_DRAWER = 'NAVIGATE_TOGGLE_DRAWER';
export const OPEN_WEBSITE = 'NAVIGATE_OPEN_WEBSITE';
export function goBack() { export function goBack() {
return { return {
...@@ -12,3 +13,10 @@ export function toggleDrawer() { ...@@ -12,3 +13,10 @@ export function toggleDrawer() {
type: TOGGLE_DRAWER, type: TOGGLE_DRAWER,
}; };
} }
export function openWebsite(url) {
return {
type: OPEN_WEBSITE,
payload: url,
};
}
const files = {}; const files = {};
files['app/ui/screens/profile/ProfileScreenNL'] = require('./nl/app/ui/screens/profile/ProfileScreen.json');
files['app/ui/screens/login/LoginScreenNL'] = require('./nl/app/ui/screens/login/LoginScreen.json');
files['app/ui/screens/memberList/MemberListScreenNL'] = require('./nl/app/ui/screens/memberList/MemberListScreen.json');
files['app/ui/screens/welcome/WelcomeScreenNL'] = require('./nl/app/ui/screens/welcome/WelcomeScreen.json');
files['app/ui/screens/welcome/EventDetailCardNL'] = require('./nl/app/ui/screens/welcome/EventDetailCard.json');
files['app/ui/screens/pizza/PizzaScreenNL'] = require('./nl/app/ui/screens/pizza/PizzaScreen.json');
files['app/ui/screens/settings/NotificationsSectionNL'] = require('./nl/app/ui/screens/settings/NotificationsSection.json'); files['app/ui/screens/settings/NotificationsSectionNL'] = require('./nl/app/ui/screens/settings/NotificationsSection.json');
files['app/ui/screens/events/CalendarScreenNL'] = require('./nl/app/ui/screens/events/CalendarScreen.json'); files['app/ui/screens/welcome/EventDetailCardNL'] = require('./nl/app/ui/screens/welcome/EventDetailCard.json');
files['app/ui/screens/welcome/WelcomeScreenNL'] = require('./nl/app/ui/screens/welcome/WelcomeScreen.json');
files['app/ui/screens/memberList/MemberListScreenNL'] = require('./nl/app/ui/screens/memberList/MemberListScreen.json');
files['app/ui/screens/profile/ProfileScreenNL'] = require('./nl/app/ui/screens/profile/ProfileScreen.json');
files['app/ui/screens/profile/AchievementSectionNL'] = require('./nl/app/ui/screens/profile/AchievementSection.json');
files['app/ui/screens/profile/DescriptionSectionNL'] = require('./nl/app/ui/screens/profile/DescriptionSection.json');
files['app/ui/screens/profile/PersonalInfoSectionNL'] = require('./nl/app/ui/screens/profile/PersonalInfoSection.json');
files['app/ui/screens/events/CalendarItemNL'] = require('./nl/app/ui/screens/events/CalendarItem.json');
files['app/ui/screens/events/RegistrationScreenNL'] = require('./nl/app/ui/screens/events/RegistrationScreen.json'); files['app/ui/screens/events/RegistrationScreenNL'] = require('./nl/app/ui/screens/events/RegistrationScreen.json');
files['app/ui/screens/events/EventAdminScreenNL'] = require('./nl/app/ui/screens/events/EventAdminScreen.json'); files['app/ui/screens/events/EventAdminScreenNL'] = require('./nl/app/ui/screens/events/EventAdminScreen.json');
files['app/ui/screens/events/CalendarItemNL'] = require('./nl/app/ui/screens/events/CalendarItem.json'); files['app/ui/screens/events/CalendarScreenNL'] = require('./nl/app/ui/screens/events/CalendarScreen.json');
files['app/ui/screens/events/EventScreenNL'] = require('./nl/app/ui/screens/events/EventScreen.json'); files['app/ui/screens/events/EventScreenNL'] = require('./nl/app/ui/screens/events/EventScreen.json');
files['app/ui/screens/pizza/PizzaScreenNL'] = require('./nl/app/ui/screens/pizza/PizzaScreen.json');
files['app/ui/screens/login/LoginScreenNL'] = require('./nl/app/ui/screens/login/LoginScreen.json');
files['app/ui/components/sidebar/SidebarNL'] = require('./nl/app/ui/components/sidebar/Sidebar.json');
files['app/ui/components/standardHeader/StandardHeaderNL'] = require('./nl/app/ui/components/standardHeader/StandardHeader.json'); files['app/ui/components/standardHeader/StandardHeaderNL'] = require('./nl/app/ui/components/standardHeader/StandardHeader.json');
files['app/ui/components/errorScreen/ErrorScreenNL'] = require('./nl/app/ui/components/errorScreen/ErrorScreen.json'); files['app/ui/components/errorScreen/ErrorScreenNL'] = require('./nl/app/ui/components/errorScreen/ErrorScreen.json');
files['app/ui/components/sidebar/SidebarNL'] = require('./nl/app/ui/components/sidebar/Sidebar.json');
files['app/AppNL'] = require('./nl/app.json');
export default { export default {
nl: { nl: {
'screens/profile/ProfileScreen': files['app/ui/screens/profile/ProfileScreenNL'],
'screens/login/LoginScreen': files['app/ui/screens/login/LoginScreenNL'],
'screens/memberList/MemberListScreen': files['app/ui/screens/memberList/MemberListScreenNL'],
'screens/welcome/WelcomeScreen': files['app/ui/screens/welcome/WelcomeScreenNL'],
'screens/welcome/EventDetailCard': files['app/ui/screens/welcome/EventDetailCardNL'],
'screens/pizza/PizzaScreen': files['app/ui/screens/pizza/PizzaScreenNL'],
'screens/settings/NotificationsSection': files['app/ui/screens/settings/NotificationsSectionNL'], 'screens/settings/NotificationsSection': files['app/ui/screens/settings/NotificationsSectionNL'],
'screens/events/CalendarScreen': files['app/ui/screens/events/CalendarScreenNL'], 'screens/welcome/EventDetailCard': files['app/ui/screens/welcome/EventDetailCardNL'],
'screens/welcome/WelcomeScreen': files['app/ui/screens/welcome/WelcomeScreenNL'],
'screens/memberList/MemberListScreen': files['app/ui/screens/memberList/MemberListScreenNL'],
'screens/profile/ProfileScreen': files['app/ui/screens/profile/ProfileScreenNL'],
'screens/profile/AchievementSection': files['app/ui/screens/profile/AchievementSectionNL'],
'screens/profile/DescriptionSection': files['app/ui/screens/profile/DescriptionSectionNL'],
'screens/profile/PersonalInfoSection': files['app/ui/screens/profile/PersonalInfoSectionNL'],
'screens/events/CalendarItem': files['app/ui/screens/events/CalendarItemNL'],
'screens/events/RegistrationScreen': files['app/ui/screens/events/RegistrationScreenNL'], 'screens/events/RegistrationScreen': files['app/ui/screens/events/RegistrationScreenNL'],
'screens/events/EventAdminScreen': files['app/ui/screens/events/EventAdminScreenNL'], 'screens/events/EventAdminScreen': files['app/ui/screens/events/EventAdminScreenNL'],
'screens/events/CalendarItem': files['app/ui/screens/events/CalendarItemNL'], 'screens/events/CalendarScreen': files['app/ui/screens/events/CalendarScreenNL'],
'screens/events/EventScreen': files['app/ui/screens/events/EventScreenNL'], 'screens/events/EventScreen': files['app/ui/screens/events/EventScreenNL'],
'screens/pizza/PizzaScreen': files['app/ui/screens/pizza/PizzaScreenNL'],
'screens/login/LoginScreen': files['app/ui/screens/login/LoginScreenNL'],
'components/sidebar/Sidebar': files['app/ui/components/sidebar/SidebarNL'],
'components/standardHeader/StandardHeader': files['app/ui/components/standardHeader/StandardHeaderNL'], 'components/standardHeader/StandardHeader': files['app/ui/components/standardHeader/StandardHeaderNL'],
'components/errorScreen/ErrorScreen': files['app/ui/components/errorScreen/ErrorScreenNL'], 'components/errorScreen/ErrorScreen': files['app/ui/components/errorScreen/ErrorScreenNL'],
'components/sidebar/Sidebar': files['app/ui/components/sidebar/SidebarNL'],
'app/App': files['app/AppNL'],
}, },
}; };
{ {
"Are you sure you want to cancel your registration?": "Weet je je zeker dat je je wilt afmelden?", "Are you sure you want to cancel your registration?": "Weet je je zeker dat je je wilt afmelden?",
"The deadline has passed, are you sure you want to cancel your registration and pay the full costs of €{{ fine }}? You will not be able to undo this!": "De deadline is verstreken, weet je zeker dat je je wilt afmelden? Dit betekent dat je de volledige kosten van €{{ fine }} zult moeten betalen. Je kunt dit niet ongedaan maken!",
"Cancel registration?": "Afmelden?", "Cancel registration?": "Afmelden?",
"No": "Nee", "No": "Nee",
"Yes": "Ja", "Yes": "Ja",
...@@ -21,7 +20,6 @@ ...@@ -21,7 +20,6 @@
"No registration required.": "Aanmelden niet vereist.", "No registration required.": "Aanmelden niet vereist.",
"Registration will open {{start}}": "Aanmelden opent {{start}}", "Registration will open {{start}}": "Aanmelden opent {{start}}",
"Registration is not possible anymore.": "Aanmelden is niet meer mogelijk.", "Registration is not possible anymore.": "Aanmelden is niet meer mogelijk.",
"Cancellation isn't possible anymore without having to pay the full costs of €{{fine}}. Also note that you will be unable to re-register.": "Afmelden is niet meer mogelijk zonder de volledige kosten van €{{fine}} te betalen. Let op: je kunt je hierna niet meer aanmelden. ",
"Put me on the waiting list": "Zet me op de wachtlijst", "Put me on the waiting list": "Zet me op de wachtlijst",
"Register": "Aanmelden", "Register": "Aanmelden",
"By registering, you confirm that you have read the": "Door te registreren, bevestig je dat je de", "By registering, you confirm that you have read the": "Door te registreren, bevestig je dat je de",
...@@ -31,5 +29,7 @@ ...@@ -31,5 +29,7 @@
"Cancel registration": "Afmelden", "Cancel registration": "Afmelden",
"Registrations": "Aanmeldingen", "Registrations": "Aanmeldingen",
"Could not load the event...": "Kan het evenement niet laden...", "Could not load the event...": "Kan het evenement niet laden...",
"Registration is not allowed anymore, as you cancelled your registration after the deadline.": "Aanmelden is niet meer toegestaan omdat je bent afgemeld na de afmelddeadline." "Registration is not allowed anymore, as you cancelled your registration after the deadline.": "Aanmelden is niet meer toegestaan omdat je bent afgemeld na de afmelddeadline.",
"The deadline has passed, are you sure you want to cancel your registration and pay the full costs of €{{ fine }}? You will not be able to undo this!": "De deadline is verstreken, weet je zeker dat je je wilt afmelden? Dit betekent dat je de volledige kosten van €{{ fine }} zult moeten betalen. Je kunt dit niet ongedaan maken!",
"Cancellation isn't possible anymore without having to pay the full costs of €{{fine}}. Also note that you will be unable to re-register.": "Afmelden is niet meer mogelijk zonder de volledige kosten van €{{fine}} te betalen. Let op: je kunt je hierna niet meer aanmelden."
} }
{
"Achievements for Thalia": "Verdiensten voor Thalia",
"today": "heden",
"Chair": "Voorzitter",
"Societies": "Gezelschappen"
}
{
"About": "Over",
"This member has not written a description yet.": "Dit lid heeft nog geen beschrijving geschreven."
}
{
"Cohort": "Cohort",
"Study programme": "Studie",
"Computing science": "Informatica",
"Information sciences": "Informatiekunde",
"Website": "Website",
"Birthday": "Verjaardag",
"Personal information": "Persoonlijke gegevens"
}
{ {
"About": "Over", "Sorry! We couldn't load any data.": "Sorry! We konden geen gegevens laden."
"This member has not written a description yet.": "Dit lid heeft nog geen beschrijving geschreven.",
"Cohort": "Cohort",
"Study programme": "Studie",
"Computing science": "Informatica",
"Information sciences": "Informatiekunde",
"Website": "Website",
"Birthday": "Verjaardag",
"Personal information": "Persoonlijke gegevens",
"Achievements for Thalia": "Verdiensten voor Thalia",
"today": "heden",
"Chair": "Voorzitter",
"Sorry! We couldn't load any data.": "Sorry! We konden geen gegevens laden.",
"Societies": "Gezelschappen"
} }
...@@ -6,18 +6,18 @@ import { ...@@ -6,18 +6,18 @@ import {
DrawerActions, DrawerActions,
} from 'react-navigation'; } from 'react-navigation';
import Login from './ui/screens/login/LoginScreenContainer'; import Login from './ui/screens/login/LoginScreenConnector';
import Welcome from './ui/screens/welcome/WelcomeScreenContainer'; import Welcome from './ui/screens/welcome/WelcomeScreenConnector';
import Event from './ui/screens/events/EventScreenContainer'; import Event from './ui/screens/events/EventScreenConnector';
import Calendar from './ui/screens/events/CalendarScreenContainer'; import Calendar from './ui/screens/events/CalendarScreenConnector';
import Profile from './ui/screens/profile/ProfileScreenContainer'; import Profile from './ui/screens/profile/ProfileScreenConnector';
import Pizza from './ui/screens/pizza/PizzaScreenContainer'; import Pizza from './ui/screens/pizza/PizzaScreenConnector';
import Registration from './ui/screens/events/RegistrationScreenContainer'; import Registration from './ui/screens/events/RegistrationScreenConnector';
import MemberList from './ui/screens/memberList/MemberListScreenContainer'; import MemberList from './ui/screens/memberList/MemberListScreenConnector';
import SplashScreen from './ui/screens/splash/SplashScreen'; import SplashScreen from './ui/screens/splash/SplashScreen';
import Settings from './ui/screens/settings/SettingsScreenContainer'; import Settings from './ui/screens/settings/SettingsScreenConnector';
import EventAdmin from './ui/screens/events/EventAdminScreenContainer'; import EventAdmin from './ui/screens/events/EventAdminScreenConnector';
import Sidebar from './ui/components/sidebar/SidebarContainer'; import Sidebar from './ui/components/sidebar/SidebarConnector';
const MainNavigator = createDrawerNavigator({ const MainNavigator = createDrawerNavigator({
Welcome, Welcome,
......
import { Linking } from 'react-native';
import { takeEvery, call } from 'redux-saga/effects'; import { takeEvery, call } from 'redux-saga/effects';
import * as navigationActions from '../actions/navigation'; import * as navigationActions from '../actions/navigation';
import * as eventActions from '../actions/event'; import * as eventActions from '../actions/event';
...@@ -23,9 +24,14 @@ function* toggleDrawer() { ...@@ -23,9 +24,14 @@ function* toggleDrawer() {
yield call(NavigationService.toggleDrawer); yield call(NavigationService.toggleDrawer);
} }
function openWebsite({ payload: url }) {
Linking.openURL(url);
}
const routerSaga = function* eventSaga() { const routerSaga = function* eventSaga() {
yield takeEvery(navigationActions.BACK, back); yield takeEvery(navigationActions.BACK, back);
yield takeEvery(navigationActions.TOGGLE_DRAWER, toggleDrawer); yield takeEvery(navigationActions.TOGGLE_DRAWER, toggleDrawer);
yield takeEvery(navigationActions.OPEN_WEBSITE, openWebsite);
yield takeEvery(welcomeActions.OPEN, navigate, 'Welcome'); yield takeEvery(welcomeActions.OPEN, navigate, 'Welcome');
yield takeEvery(settingsActions.OPEN, navigate, 'Settings'); yield takeEvery(settingsActions.OPEN, navigate, 'Settings');
yield takeEvery(calendarActions.OPEN, navigate, 'Calendar'); yield takeEvery(calendarActions.OPEN, navigate, 'Calendar');
......
...@@ -2,8 +2,8 @@ import { connect } from 'react-redux'; ...@@ -2,8 +2,8 @@ import { connect } from 'react-redux';
import * as profileActions from '../../../actions/profile'; import * as profileActions from '../../../actions/profile';
import MemberView from './MemberView'; import MemberView from './MemberView';
const mapDispatchToProps = dispatch => ({ const mapDispatchToProps = {
loadProfile: pk => dispatch(profileActions.profile(pk)), loadProfile: profileActions.profile,
}); };
export default connect(() => ({}), mapDispatchToProps)(MemberView); export default connect(() => ({}), mapDispatchToProps)(MemberView);
...@@ -12,13 +12,13 @@ const mapStateToProps = state => ({ ...@@ -12,13 +12,13 @@ const mapStateToProps = state => ({
photo: state.session.photo, photo: state.session.photo,
}); });
const mapDispatchToProps = dispatch => ({ const mapDispatchToProps = {
loadProfile: () => dispatch(profileActions.profile()), loadProfile: profileActions.profile,
openCalendar: () => dispatch(calendarActions.open()), openCalendar: calendarActions.open,
openMemberList: () => dispatch(membersActions.members()), openMemberList: membersActions.members,
openWelcome: () => dispatch(welcomeActions.open()), openWelcome: welcomeActions.open,
openSettings: () => dispatch(settingsActions.open()), openSettings: settingsActions.open,
signOut: () => dispatch(loginActions.signOut()), signOut: loginActions.signOut,
}); };
export default connect(mapStateToProps, mapDispatchToProps)(Sidebar); export default connect(mapStateToProps, mapDispatchToProps)(Sidebar);
import { Linking } from 'react-native';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import * as eventActions from '../../../actions/event'; import * as eventActions from '../../../actions/event';
import CalendarItem from './CalendarItem'; import CalendarItem from './CalendarItem';
import * as navigationActions from '../../../actions/navigation';
const mapDispatchToProps = dispatch => ({ const mapDispatchToProps = {
loadEvent: (event) => { loadEvent: (event) => {
if (event.partner) { if (event.partner) {
Linking.openURL(event.url); return navigationActions.openWebsite(event.url);
} else {
dispatch(eventActions.event(event.pk));
} }
return eventActions.event(event.pk);
}, },
}); };
export default connect(() => ({}), mapDispatchToProps)(CalendarItem); export default connect(() => ({}), mapDispatchToProps)(CalendarItem);
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
import { translate } from 'react-i18next'; import { translate } from 'react-i18next';
import Moment from 'moment'; import Moment from 'moment';
import locale from 'react-native-locale-detector'; import locale from 'react-native-locale-detector';
import CalendarItem from './CalendarItemContainer'; import CalendarItem from './CalendarItemConnector';
import LoadingScreen from '../../components/loadingScreen/LoadingScreen'; import LoadingScreen from '../../components/loadingScreen/LoadingScreen';
import ErrorScreen from '../../components/errorScreen/ErrorScreen'; import ErrorScreen from '../../components/errorScreen/ErrorScreen';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment