mirror of
https://github.com/ragestudio/comty.git
synced 2025-07-08 08:44:15 +00:00
Remove Music tab from account page
This commit is contained in:
parent
f79db03a1b
commit
7206f00c00
@ -14,7 +14,6 @@ import FollowsModel from "@models/follows"
|
|||||||
|
|
||||||
import DetailsTab from "./tabs/details"
|
import DetailsTab from "./tabs/details"
|
||||||
import PostsTab from "./tabs/posts"
|
import PostsTab from "./tabs/posts"
|
||||||
import MusicTab from "./tabs/music"
|
|
||||||
import FollowersTab from "./tabs/followers"
|
import FollowersTab from "./tabs/followers"
|
||||||
|
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
@ -23,7 +22,6 @@ const TabsComponent = {
|
|||||||
posts: PostsTab,
|
posts: PostsTab,
|
||||||
followers: FollowersTab,
|
followers: FollowersTab,
|
||||||
details: DetailsTab,
|
details: DetailsTab,
|
||||||
music: MusicTab,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const Account = ({ params }) => {
|
const Account = ({ params }) => {
|
||||||
@ -115,11 +113,6 @@ const Account = ({ params }) => {
|
|||||||
setTabActiveKey(normalizedKey)
|
setTabActiveKey(normalizedKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onPostListTopVisibility = () => {
|
|
||||||
// This function was referenced but not defined in the original component
|
|
||||||
// You may need to implement this based on your requirements
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadUserData()
|
loadUserData()
|
||||||
}, [params.username])
|
}, [params.username])
|
||||||
@ -204,7 +197,6 @@ const Account = ({ params }) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{React.createElement(TabsComponent[tabActiveKey], {
|
{React.createElement(TabsComponent[tabActiveKey], {
|
||||||
onTopVisibility: onPostListTopVisibility,
|
|
||||||
state: state,
|
state: state,
|
||||||
})}
|
})}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
@ -223,11 +215,6 @@ const Account = ({ params }) => {
|
|||||||
label: "Posts",
|
label: "Posts",
|
||||||
icon: "FiBookOpen",
|
icon: "FiBookOpen",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "music",
|
|
||||||
label: "Music",
|
|
||||||
icon: "MdAlbum",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "followers",
|
id: "followers",
|
||||||
label: "Followers",
|
label: "Followers",
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
import React from "react"
|
|
||||||
import * as antd from "antd"
|
|
||||||
import classnames from "classnames"
|
|
||||||
|
|
||||||
import Playlist from "@components/Music/Playlist"
|
|
||||||
|
|
||||||
import MusicModel from "@models/music"
|
|
||||||
|
|
||||||
import "./index.less"
|
|
||||||
|
|
||||||
export default (props) => {
|
|
||||||
const user_id = props.state.user._id
|
|
||||||
|
|
||||||
const [L_Releases, R_Releases, E_Releases, M_Releases] =
|
|
||||||
app.cores.api.useRequest(MusicModel.getAllReleases, {
|
|
||||||
user_id: user_id,
|
|
||||||
})
|
|
||||||
|
|
||||||
if (E_Releases) {
|
|
||||||
return (
|
|
||||||
<antd.Result
|
|
||||||
status="warning"
|
|
||||||
title="Failed to retrieve releases"
|
|
||||||
subTitle={E_Releases.message}
|
|
||||||
/>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (L_Releases) {
|
|
||||||
return <antd.Skeleton active />
|
|
||||||
}
|
|
||||||
|
|
||||||
const isEmpty = R_Releases.items.length === 0
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div
|
|
||||||
className={classnames("profile_releases", {
|
|
||||||
["empty"]: isEmpty,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
{isEmpty && (
|
|
||||||
<antd.Result
|
|
||||||
status="warning"
|
|
||||||
title="This user has no releases yet."
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{R_Releases.items.map((r) => {
|
|
||||||
return <Playlist key={r._id} playlist={r} />
|
|
||||||
})}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
.profile_releases {
|
|
||||||
display: grid;
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
grid-auto-columns: auto;
|
|
||||||
|
|
||||||
grid-template-columns: repeat(3, 1fr);
|
|
||||||
grid-template-rows: 1fr;
|
|
||||||
grid-column-gap: 20px;
|
|
||||||
grid-row-gap: 20px;
|
|
||||||
|
|
||||||
@media (min-width: 2000px) {
|
|
||||||
grid-template-columns: repeat(4, 1fr);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 2300px) {
|
|
||||||
grid-template-columns: repeat(5, 1fr);
|
|
||||||
}
|
|
||||||
|
|
||||||
.playlistItem {
|
|
||||||
justify-self: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.empty {
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user