diff --git a/frontend/src/Layout.js b/frontend/src/Layout.js
index 6a23c28..07108b8 100644
--- a/frontend/src/Layout.js
+++ b/frontend/src/Layout.js
@@ -1,35 +1,35 @@
-import React from "react"
-import { Switch, Route } from "react-router-dom"
-import { Link } from "react-router-dom"
-import { Layout, Menu, Icon } from "antd"
+import React from "react";
+import { Switch, Route } from "react-router-dom";
+import { Link } from "react-router-dom";
+import { Layout, Menu, Icon } from "antd";
-import logo from "./static/listmonk.svg"
+import logo from "./static/listmonk.svg";
// Views.
-import Dashboard from "./Dashboard"
-import Lists from "./Lists"
-import Subscribers from "./Subscribers"
-import Subscriber from "./Subscriber"
-import Templates from "./Templates"
-import Import from "./Import"
-import Campaigns from "./Campaigns"
-import Campaign from "./Campaign"
-import Media from "./Media"
+import Dashboard from "./Dashboard";
+import Lists from "./Lists";
+import Subscribers from "./Subscribers";
+import Subscriber from "./Subscriber";
+import Templates from "./Templates";
+import Import from "./Import";
+import Campaigns from "./Campaigns";
+import Campaign from "./Campaign";
+import Media from "./Media";
-const { Content, Footer, Sider } = Layout
-const SubMenu = Menu.SubMenu
-const year = new Date().getUTCFullYear()
+const { Content, Footer, Sider } = Layout;
+const SubMenu = Menu.SubMenu;
+const year = new Date().getUTCFullYear();
class Base extends React.Component {
state = {
basePath: "/" + window.location.pathname.split("/")[1],
error: null,
collapsed: false
- }
+ };
onCollapse = collapsed => {
- this.setState({ collapsed })
- }
+ this.setState({ collapsed });
+ };
render() {
return (
@@ -245,13 +245,20 @@ class Base extends React.Component {
>
listmonk
{" "}
- © 2019 {year !== 2019 ? " - " + year : ""}
+ © 2019 {year !== 2019 ? " - " + year : ""} —{" "}
+
+ Docs
+
- )
+ );
}
}
-export default Base
+export default Base;
diff --git a/frontend/src/Subscribers.js b/frontend/src/Subscribers.js
index 5fe9062..dea98dc 100644
--- a/frontend/src/Subscribers.js
+++ b/frontend/src/Subscribers.js
@@ -650,9 +650,14 @@ class Subscribers extends React.PureComponent {
autosize={{ minRows: 2, maxRows: 10 }}
/>
- Write a partial SQL expression to query the subscribers
- based on their primary information or attributes. Learn
- more.
+ Partial SQL expression to query subscriber attributes.{" "}
+
+ Learn more
diff --git a/frontend/src/Templates.js b/frontend/src/Templates.js
index e4a46f0..684471e 100644
--- a/frontend/src/Templates.js
+++ b/frontend/src/Templates.js
@@ -1,4 +1,4 @@
-import React from "react"
+import React from "react";
import {
Row,
Col,
@@ -13,11 +13,11 @@ import {
Popconfirm,
Spin,
notification
-} from "antd"
+} from "antd";
-import ModalPreview from "./ModalPreview"
-import Utils from "./utils"
-import * as cs from "./constants"
+import ModalPreview from "./ModalPreview";
+import Utils from "./utils";
+import * as cs from "./constants";
class CreateFormDef extends React.PureComponent {
state = {
@@ -25,17 +25,17 @@ class CreateFormDef extends React.PureComponent {
modalWaiting: false,
previewName: "",
previewBody: ""
- }
+ };
// Handle create / edit form submission.
handleSubmit = e => {
- e.preventDefault()
+ e.preventDefault();
this.props.form.validateFields((err, values) => {
if (err) {
- return
+ return;
}
- this.setState({ modalWaiting: true })
+ this.setState({ modalWaiting: true });
if (this.props.formType === cs.FormCreate) {
// Create a new list.
this.props
@@ -50,19 +50,19 @@ class CreateFormDef extends React.PureComponent {
placement: cs.MsgPosition,
message: "Template added",
description: `"${values["name"]}" added`
- })
- this.props.fetchRecords()
- this.props.onClose()
- this.setState({ modalWaiting: false })
+ });
+ this.props.fetchRecords();
+ this.props.onClose();
+ this.setState({ modalWaiting: false });
})
.catch(e => {
notification["error"]({
placement: cs.MsgPosition,
message: "Error",
description: e.message
- })
- this.setState({ modalWaiting: false })
- })
+ });
+ this.setState({ modalWaiting: false });
+ });
} else {
// Edit a list.
this.props
@@ -77,43 +77,43 @@ class CreateFormDef extends React.PureComponent {
placement: cs.MsgPosition,
message: "Template updated",
description: `"${values["name"]}" modified`
- })
- this.props.fetchRecords()
- this.props.onClose()
- this.setState({ modalWaiting: false })
+ });
+ this.props.fetchRecords();
+ this.props.onClose();
+ this.setState({ modalWaiting: false });
})
.catch(e => {
notification["error"]({
placement: cs.MsgPosition,
message: "Error",
description: e.message
- })
- this.setState({ modalWaiting: false })
- })
+ });
+ this.setState({ modalWaiting: false });
+ });
}
- })
- }
+ });
+ };
handleConfirmBlur = e => {
- const value = e.target.value
- this.setState({ confirmDirty: this.state.confirmDirty || !!value })
- }
+ const value = e.target.value;
+ this.setState({ confirmDirty: this.state.confirmDirty || !!value });
+ };
handlePreview = (name, body) => {
- this.setState({ previewName: name, previewBody: body })
- }
+ this.setState({ previewName: name, previewBody: body });
+ };
render() {
- const { formType, record, onClose } = this.props
- const { getFieldDecorator } = this.props.form
+ const { formType, record, onClose } = this.props;
+ const { getFieldDecorator } = this.props.form;
const formItemLayout = {
labelCol: { xs: { span: 16 }, sm: { span: 4 } },
wrapperCol: { xs: { span: 16 }, sm: { span: 18 } }
- }
+ };
if (formType === null) {
- return null
+ return null;
}
return (
@@ -173,8 +173,12 @@ class CreateFormDef extends React.PureComponent {
{"}"}
{" "}
should appear in the template.{" "}
-
- Read more on templating
+
+ Learn more