Simplified profile page BOD-323

This commit is contained in:
Patrick Fic
2020-08-27 11:27:56 -07:00
parent 5c643515c0
commit 3150fdaade
13 changed files with 121 additions and 94 deletions

View File

@@ -1,11 +1,22 @@
import React, { useEffect } from "react";
import ProfilePage from "./profile.page";
import { useTranslation } from "react-i18next";
export default function ProfileContainerPage() {
import { connect } from "react-redux";
import { setBreadcrumbs } from "../../redux/application/application.actions";
import ProfilePage from "./profile.page";
const mapDispatchToProps = (dispatch) => ({
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
});
export function ProfileContainerPage({ setBreadcrumbs }) {
const { t } = useTranslation();
useEffect(() => {
setBreadcrumbs([
{ link: "/manage/profile", label: t("titles.bc.profile") },
]);
document.title = t("titles.profile");
}, [t]);
}, [t, setBreadcrumbs]);
return <ProfilePage />;
}
export default connect(null, mapDispatchToProps)(ProfileContainerPage);

View File

@@ -1,20 +1,12 @@
import { Layout } from "antd";
import React, { useState } from "react";
import ProfileContent from "../../components/profile-content/profile-content.component";
import ProfileSideBar from "../../components/profile-sidebar/profile-sidebar.component";
import React from "react";
import ProfileMyComponent from "../../components/profile-my/profile-my.component";
import ProfileShopsContainer from "../../components/profile-shops/profile-shops.container";
export default function ProfilePage() {
const [sidebarSelection, setSidebarSelection] = useState({ key: "profile" });
return (
<Layout>
<ProfileSideBar
sidebarSelection={sidebarSelection}
setSidebarSelection={setSidebarSelection}
/>
<Layout.Content>
<ProfileContent sidebarSelection={sidebarSelection} />
</Layout.Content>
</Layout>
<div>
<ProfileMyComponent />
<ProfileShopsContainer />;
</div>
);
}