forked from muhgumus/react-native-wordpress
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
62 lines (51 loc) · 1.73 KB
/
index.js
File metadata and controls
62 lines (51 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import {Provider, connect} from "react-redux"
import thunk from "redux-thunk"
import logger from "redux-logger"
import reducer from "./redux/reducers"
import { StackNavigator } from 'react-navigation';
import getSlideFromRightTransition from 'react-navigation-slide-from-right-transition';
import Main from './containers/Main';
import Detail from './containers/Detail';
import PostList from './containers/PostList';
console.disableYellowBox = true;
AppNavigator = StackNavigator({
Main: { screen: Main},
Detail: { screen: Detail},
PostList: { screen: PostList},
}
, {
transitionConfig: getSlideFromRightTransition
} //Soldan Sağa kayma efekti için (android)*/
);
connect(AppNavigator)
const store = createStore(
reducer,
applyMiddleware(
thunk,
logger
) //once thunk sonra logger olmak zorunda yoksa undefined action fırlatır.
)
let strings_en={categories:"Categories", pages:"Pages", searchText:"Write anything for search", homepage:"Home", warningText:"Ops someting is wrong", nowordpressText:"Your address may not be a Wordpress site", noexternalUseText:"Your address is Wordpress site but not accepted external use", tryanother:"TRY ANOTHER"}
var App = (data) => {
console.log("DATA",data);
return data.strings ?
<Provider store={store}>
<AppNavigator screenProps={{onLoad:data.onLoad, color:data.color, url:data.url, strings:data.strings ? data.strings : strings_en }} />
</Provider>
: null
}
;
module.exports = App