diff --git a/packages/client/src/pages/Profile/Section/Body/index.js b/packages/client/src/pages/Profile/Section/Body/index.js
index 2de6566e62..8d687241c2 100644
--- a/packages/client/src/pages/Profile/Section/Body/index.js
+++ b/packages/client/src/pages/Profile/Section/Body/index.js
@@ -33,9 +33,11 @@ const Wrapper = styled.div`
`;
const SectionBodyContent = (props) => {
- const { isProfileLoaded, t } = props;
+ const { isProfileLoaded, profile, t } = props;
const navigate = useNavigate();
+ console.log("profile", profile);
+
const data = [
{
id: "login",
@@ -47,11 +49,6 @@ const SectionBodyContent = (props) => {
name: t("Notifications:Notifications"),
content: ,
},
- {
- id: "file-management",
- name: t("FileManagement"),
- content:
File management
,
- },
{
id: "interface-theme",
name: t("InterfaceTheme"),
@@ -59,6 +56,13 @@ const SectionBodyContent = (props) => {
},
];
+ if (!profile?.isVisitor)
+ data.splice(2, 0, {
+ id: "file-management",
+ name: t("FileManagement"),
+ content: File management
,
+ });
+
const getCurrentTab = () => {
const path = location.pathname;
const currentTab = data.findIndex((item) => path.includes(item.id));
@@ -86,10 +90,13 @@ const SectionBodyContent = (props) => {
);
};
-export default inject(({ clientLoadingStore }) => {
+export default inject(({ peopleStore, clientLoadingStore }) => {
const { isProfileLoaded } = clientLoadingStore;
+ const { targetUser: profile } = peopleStore.targetUserStore;
+
return {
isProfileLoaded,
+ profile,
};
})(
observer(