@nu-art/thunder
Version:
Thunder - React & Typescript based frontend framework
34 lines • 1.6 kB
JavaScript
;
/*
* Thunder is a typescript & react frontend foundation that natively
* runs on firebase function and is a part of the Thunderstorm larger project
*
* Copyright (C) 2018 Adam van der Kruk aka TacB0sS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var react_router_dom_1 = require("react-router-dom");
var ts_common_1 = require("@nu-art/ts-common");
var react_hot_loader_1 = require("react-hot-loader");
// noinspection TypeScriptPreferShortImport`
var history_module_1 = require("../modules/history-module");
exports.AppWrapper = react_hot_loader_1.hot(module)(function (props) {
var MainApp = props.Thunder.getMainApp();
if (!MainApp)
throw new ts_common_1.ImplementationMissingException("mainApp was not specified!!");
return (React.createElement(react_router_dom_1.Router, { history: history_module_1.BrowserHistoryModule.getHistory() },
React.createElement(MainApp, { Thunder: props.Thunder })));
});
//# sourceMappingURL=AppWrapper.js.map