-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
54 lines (54 loc) · 2.33 KB
/
App.js
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
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var react_navigation_1 = require("react-navigation");
var apollo_client_1 = require("apollo-client");
var react_apollo_1 = require("react-apollo");
var apollo_link_http_1 = require("apollo-link-http");
var apollo_cache_inmemory_1 = require("apollo-cache-inmemory");
var AddReservation_1 = __importDefault(require("./screens/AddReservation"));
var ViewReservations_1 = __importDefault(require("./screens/ViewReservations"));
var Confirmation_1 = __importDefault(require("./screens/Confirmation"));
var AppNavigator = react_navigation_1.createStackNavigator({
View: ViewReservations_1.default,
Add: AddReservation_1.default,
Confirm: Confirmation_1.default
}, {
initialRouteName: 'View'
});
exports.AppContainer = react_navigation_1.createAppContainer(AppNavigator);
var client = new apollo_client_1.ApolloClient({
link: new apollo_link_http_1.HttpLink({ uri: 'https://us1.prisma.sh/public-luckox-377/reservation-graphql-backend/dev' }),
cache: new apollo_cache_inmemory_1.InMemoryCache()
});
/**
* App is the entry point for the application.
*/
var App = /** @class */ (function (_super) {
__extends(App, _super);
function App() {
return _super !== null && _super.apply(this, arguments) || this;
}
App.prototype.render = function () {
return (react_1.default.createElement(react_apollo_1.ApolloProvider, { client: client },
react_1.default.createElement(exports.AppContainer, null)));
};
return App;
}(react_1.default.PureComponent));
exports.default = App;