Skip to content

Commit

Permalink
reorder imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Pau1fitz committed Jan 31, 2020
1 parent 442baea commit c2808ef
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import {
pauseSong,
resumeSong
} from "./actions/songActions";
import "./App.css";

import Header from "./components/Header";
import Footer from "./components/Footer";
import UserPlaylists from "./components/UserPlaylists";
import MainView from "./components/MainView";
import ArtWork from "./components/ArtWork";
import MainHeader from "./components/MainHeader";
import SideMenu from "./components/SideMenu";
import "./App.css";

class App extends Component {
static audio;
Expand Down

3 comments on commit c2808ef

@Deesteph55
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello Paul. Please may i ask you a question? I saw something in your code that could help with mine but I am a little confused and would like clarification on some things. Thank you

@Pau1fitz
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the question?

@Deesteph55
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the question?

In your demo, under the browse tab, under featured, I am able to click on the featured playlist and the playlist comes up. How were you able to do that? I am trying to implement something like that on my app(click on a button and info displays in that same place) and dont know how to do that. How did you make the page that was there before disappear and have new info come up in its place?I looked at your code(BrowseView):

`if(view) {

browseView = view.map((item, i) => {

  const getPlaylistSongs = () => {
    addPlaylistItem(item);
    fetchPlaylistSongs(item.owner.id, item.id, token);
    updateHeaderTitle(item.name);
  };

  return(
    <li onClick={viewType === 'Featured' ? getPlaylistSongs : null} className='category-item' key={ i }>
      <div className='category-image'>
        <img src={ item.icons ? item.icons[0].url : item.images[0].url} />
        {viewType === 'Genres' && (
          <p className='category-name'>{ item.name }</p>
        )}
      </div>
    </li>
  );
});

}

return (


    { browseView }
`

And I was confused. Is the ul tag listing out the Genre, New releases and Featured links or the info under those links? What part of your code above is responsible for rendering the playlist after it is clicked on.

Thank you.

Please sign in to comment.