Updated Print Center & TemplateList Object IO-587

This commit is contained in:
Patrick Fic
2021-01-19 16:30:46 -08:00
parent 4c5f9a5522
commit a29c305427
19 changed files with 152 additions and 150 deletions

View File

@@ -7,14 +7,14 @@ import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useHistory, useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { logImEXEvent } from "../../firebase/firebase.utils";
import {
INSERT_TEMPLATE,
QUERY_TEMPLATES_BY_NAME_FOR_DUPE,
} from "../../graphql/templates.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { TemplateList } from "../../utils/TemplateConstants";
import { logImEXEvent } from "../../firebase/firebase.utils";
import client from "../../utils/GraphQLClient";
import { TemplateList } from "../../utils/TemplateConstants";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
@@ -67,12 +67,12 @@ export function ShopTemplateAddComponent({
history.push({ search: queryString.stringify(search) });
if (!!refetch) refetch();
};
const TemplateListGenerated = TemplateList();
const menu = (
<Menu onClick={handleAdd}>
{availableTemplateKeys.length > 0 ? (
availableTemplateKeys.map((tkey) => (
<Menu.Item key={tkey}>{TemplateList()[tkey].title}</Menu.Item>
<Menu.Item key={tkey}>{TemplateListGenerated[tkey].title}</Menu.Item>
))
) : (
<div>{t("bodyshop.labels.notemplatesavailable")}</div>