This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function redirectUrlToSpotifyForLogin(){ | |
var CLIENT_ID = process.env.REACT_APP_SPOTIFY_CLIENT_ID; | |
var REDIRECT_URI = process.env.REACT_APP_SPOTIFY_REDIRECT_URI; | |
const scopes = [ | |
"user-modify-playback-state", | |
"user-library-read", | |
"user-library-modify", | |
"playlist-read-private", | |
"playlist-modify-public", | |
"playlist-modify-private"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Spotify from 'spotify-web-api-js'; | |
import uniq from 'lodash.uniq'; | |
import flatten from 'lodash.flatten'; | |
import chunk from 'lodash.chunk'; | |
const spotifyApi = new Spotify(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//spotifyFunctions.js | |
import Spotify from 'spotify-web-api-js'; | |
import uniq from 'lodash.uniq'; | |
import flatten from 'lodash.flatten'; | |
import chunk from 'lodash.chunk'; | |
const spotifyApi = new Spotify(); | |
export function redirectUrlToSpotifyForLogin(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* PlaylistChooser.css */ | |
.PlaylistChooser { | |
height: 100%; | |
width:100%; | |
max-width:800px; | |
display: flex; | |
flex-direction: column; | |
align-content: space-around; | |
justify-content: space-around; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PlaylistChooser.js | |
import React, { Component } from 'react'; | |
import './PlaylistChooser.css'; | |
import { withStyles } from '@material-ui/core/styles'; | |
import List from '@material-ui/core/List'; | |
import ListItem from '@material-ui/core/ListItem'; | |
import ListItemText from '@material-ui/core/ListItemText'; | |
import Menu from '@material-ui/core/Menu'; | |
import MenuItem from '@material-ui/core/MenuItem'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SpotifyContainer.js | |
import React, { Component } from 'react'; | |
import './SpotifyContainer.css'; | |
import Paper from '@material-ui/core/Paper'; | |
import ConnectSpotify from './ConnectSpotify'; | |
import PlaylistChooser from './PlaylistChooser'; | |
import * as SpotifyFunctions from '../spotifyFunctions.js' | |
class SpotifyContainer extends Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//spotifyFunctions.js | |
import Spotify from 'spotify-web-api-js'; | |
import uniq from 'lodash.uniq'; | |
import flatten from 'lodash.flatten'; | |
import chunk from 'lodash.chunk'; | |
export function redirectUrlToSpotifyForLogin(){ | |
const CLIENT_ID = process.env.REACT_APP_SPOTIFY_CLIENT_ID; | |
const REDIRECT_URI = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* SpotifyContainer.css */ | |
.SpotifyContainer { | |
height: 100%; | |
max-width:800px; | |
width:100%; | |
display: flex; | |
flex-direction: column; | |
align-self: flex-end; | |
justify-content: stretch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SpotifyContainer.js | |
import React, { Component } from 'react'; | |
import './SpotifyContainer.css'; | |
import Paper from '@material-ui/core/Paper'; | |
import ConnectSpotify from './ConnectSpotify'; | |
import * as SpotifyFunctions from '../spotifyFunctions.js' | |
class SpotifyContainer extends Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ConnectSpotify.css */ | |
.ConnectSpotify { | |
height: 100%; | |
max-width:800px; | |
padding: 20px; | |
display: flex; | |
flex-direction: column; | |
align-content: space-around; | |
} |