spee.ch/client/build/reducers/site.js

53 lines
1.5 KiB
JavaScript
Raw Normal View History

2018-05-23 04:06:37 +02:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
2018-06-07 00:12:07 +02:00
exports.default = _default;
2018-05-23 04:06:37 +02:00
var _siteConfig = _interopRequireDefault(require("@config/siteConfig.json"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2018-05-23 04:06:37 +02:00
var initialState = {
description: 'default description',
googleAnalyticsId: 'default google id',
host: 'default host',
title: 'default title',
twitter: 'default twitter',
defaultDescription: 'default description',
defaultThumbnail: 'default thumbnail'
};
2018-05-23 04:06:37 +02:00
if (_siteConfig.default) {
var googleAnalyticsId = _siteConfig.default.analytics.googleId,
_siteConfig$assetDefa = _siteConfig.default.assetDefaults,
defaultThumbnail = _siteConfig$assetDefa.thumbnail,
defaultDescription = _siteConfig$assetDefa.description,
_siteConfig$details = _siteConfig.default.details,
description = _siteConfig$details.description,
host = _siteConfig$details.host,
title = _siteConfig$details.title,
twitter = _siteConfig$details.twitter;
initialState = {
description: description,
googleAnalyticsId: googleAnalyticsId,
host: host,
title: title,
twitter: twitter,
defaultDescription: defaultDescription,
defaultThumbnail: defaultThumbnail
2018-05-23 04:06:37 +02:00
};
}
2018-06-07 00:12:07 +02:00
function _default() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
var action = arguments.length > 1 ? arguments[1] : undefined;
switch (action.type) {
default:
return state;
}
2018-06-07 00:12:07 +02:00
}
2018-05-23 04:06:37 +02:00
2018-06-07 00:12:07 +02:00
;