@@ -7,7 +7,7 @@ import { ban, authenticate } from "actions/app";
import Menu from "components/Global/Menu";
import io from "../../io";
-import config from "../../../../config/default";
+import config from "config";
import AuthRoute from "../Auth/AuthRoute";
const asyncComponent = getComponent => {
@@ -4,7 +4,7 @@ import CustomInput from "./CustomInput.jsx";
import CustomErrors from "./CustomErrors.jsx";
export default class Login extends Component {
constructor() {
export default class Register extends Component {
@@ -4,7 +4,7 @@ import PropTypes from "prop-types";
import { connect } from "react-redux";
import { NavLink } from "react-router-dom";
import CustomInput from "./CustomInput.jsx";
@@ -3,6 +3,8 @@ import PropTypes from "prop-types";
import { increment } from "actions/app";
+
@connect(state => ({
counter: state.app.get("counter"),
}))
@@ -0,0 +1,18 @@
+import templateConfig from "./template";
+import defaultConfig from "./default";
+function replaceObject(toReplace, toReplaceWith) {
+ const toReplaceObj = toReplace;
+ Object.keys(toReplaceWith).forEach((key) => {
+ const value = toReplaceWith[key];
+ if (!value) return;
+ if (typeof value === "object") {
+ toReplaceObj[key] = replaceObject(toReplace[key], toReplaceWith[key]);
+ } else {
+ toReplaceObj[key] = value;
+ }
+ });
+ return toReplaceObj;
+}
+export default replaceObject(templateConfig, defaultConfig);
@@ -1,11 +1,11 @@
export default {
- "recaptcha": {
- "key": ""
+ "recaptcha": {
+ "key": "",
},
- "serverDomain": "",
- "cookie": {
+ "serverDomain": "",
+ "cookie": {
"domain": "",
"secure": false,
"sidName": "SID",
- }
-}
+ },
+};
@@ -142,7 +142,8 @@ module.exports = {
extensions: [".webpack-loader.js", ".web-loader.js", ".loader.js", ".js", ".jsx"],
modules: [
path.resolve(__dirname, "node_modules"),
- path.join(__dirname, "./app/js"),
+ path.resolve(__dirname, "./app/js"),
+ path.resolve(__dirname, "./"),
],
plugins,