@material-ui/icons#PlaylistPlay JavaScript Examples
The following examples show how to use
@material-ui/icons#PlaylistPlay.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Profile.jsx From soundly with MIT License | 5 votes |
function Profile() {
const {playlists} = useSelector(state => state.musicReducer);
const [mostPlayed, setMostPlayed] = useState([]);
function sortByProperty(property) {
return function (a, b) {
if (a[property] > b[property])
return 1;
else if (a[property] < b[property])
return -1;
return 0;
}
}
useEffect(() => {
setMostPlayed(playlists.sort(sortByProperty("timesPlayed")));
}, [playlists]);
useEffect(() => {
Grade(document.querySelectorAll('.gradient-wrap'))
});
return (
<Container>
<div className={"Profile"}>
<div className="top-profile">
<Avatar variant={"rounded"} src={require("../assets/img/avatar2.jpg").default}
style={{width: "150px", height: "150px"}}>
VS
</Avatar>
<div className="profile-detail">
<h3>Vishal Singh</h3>
<span className={"profile-playlist"}>
<SideBarOptions className={"lib-sub"} Icon={PlaylistPlay}
href={"/home/playlist/instrumental"} title={"Instrumental"}/>
<SideBarOptions className={"lib-sub"} Icon={PlaylistPlay} href={"/home/playlist/electronic"}
title={"Electronic"}/>
</span>
</div>
</div>
<div className="bottom-profile">
<div>
<h3>Most Played</h3>
<div className="most-played">
{
mostPlayed.map((item, index) => (
index <= 4 && <MusicCard key={item.id} music={item}/>
))
}
</div>
</div>
</div>
</div>
</Container>
);
}
Example #2
Source File: SideBar.jsx From soundly with MIT License | 5 votes |
function SideBar() {
const { user, isAuthenticated } = useMoralis();
// console.log("user from sidebar", user, isAuthenticated);
const useStyle = useContext(ThemeContext);
return (
<aside className={"aside-bar"}>
<div className="aside-bar-container">
<div className="profile-wrapper">
<img src={"../profile.png"} alt="profile" className="profile-picture" />
</div>
<SideBarOptions className={"lib-sub"} Icon={HomeOutlined} href={"/home"} title={"Home"} />
<SideBarOptions className={"lib-sub"} Icon={SearchOutlined} href={"/home"} title={"Search"} />
<SideBarOptions className={"lib-sub"} Icon={PlaylistPlay} href={"/home/playlist"} title={"Playlist"} />
{/* {user.get("isVerified") && ( */}
<SideBarOptions className={"lib-sub"} Icon={ExploreOutlined} href={"/home/dashboard"} title={"Dashboard"} />
{/* )} */}
{/* <SideBarOptions className={"lib-sub"} Icon={SearchOutlined} href={"/home/search"} title={"Search"}/> */}
{/*<SideBarOptions className={"lib-sub"} Icon={AlbumIcon} href={"/home/album"} title={"Album"}/>
<SideBarOptions className={"lib-sub"} Icon={EmojiPeopleIcon} href={"/home/artist"} title={"Artist"}/>*/}
</div>
{/* <div className="aside-bar-container playlist">
<p className={"p1"}>
<span>MY PLAYLIST</span>
</p>
<SideBarOptions
className={"lib-sub"}
Icon={PlaylistPlay}
href={"/home/playlist/instrumental"}
title={"Instrumental"}
/>
<SideBarOptions
className={"lib-sub"}
Icon={PlaylistPlay}
href={"/home/playlist/electronic"}
title={"Electronic"}
/>
</div> */}
</aside>
);
}