2018-05-23 04:06:37 +02:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
|
value: true
|
|
|
|
});
|
|
|
|
exports.default = void 0;
|
|
|
|
|
2018-06-06 21:01:11 +02:00
|
|
|
var _siteConfig = _interopRequireDefault(require("@config/siteConfig"));
|
|
|
|
|
|
|
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
2018-05-23 04:06:37 +02:00
|
|
|
|
2018-06-06 21:01:11 +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
|
|
|
|
2018-06-06 21:01:11 +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-06 21:01:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var _default = 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-05-23 04:06:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
exports.default = _default;
|