Files
bodyshop/client/src/components/profile-content/profile-content.component.jsx
2020-02-04 16:56:34 -08:00

21 lines
644 B
JavaScript

import React from "react";
import { useTranslation } from "react-i18next";
import AlertComponent from "../alert/alert.component";
import ProfileMyComponent from "../profile-my/profile-my.component";
import ProfileShopsContainer from "../profile-shops/profile-shops.container";
export default function ProfileContent({ sidebarSelection }) {
const { t } = useTranslation();
switch (sidebarSelection.key) {
case "profile":
return <ProfileMyComponent />;
case "shops":
return <ProfileShopsContainer />;
default:
return (
<AlertComponent message={t("profile.errors.state")} type="error" />
);
}
}