Skip to content

Commit 97d65c8

Browse files
committed
clean up shared folder
1 parent a084caa commit 97d65c8

File tree

8 files changed

+11
-18
lines changed

8 files changed

+11
-18
lines changed

src/View/Detail/reducer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,4 @@ const setArtist = (state, action) => {
4242
return Object.assign({}, state, {artist})
4343
}
4444

45-
46-
4745
export default Detail;

src/View/Search/index.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Search extends Component {
3333
let { handleChange, genres, cache, handleSetSelected, artists, handleDetailView, selectedGenre } = this.props,
3434
artistListing = artists && artists.length ? artists.map((artist) => <div className="col" key={artist.id}><Artist artist={artist} handleDetailView={handleDetailView} /></div>) : null,
3535
selected = selectedGenre ? <span>You have selected the <em>{selectedGenre}</em> genre</span> : null;
36+
3637
return (
3738
<div className="search col-sm">
3839
<h1>Search</h1>
@@ -54,7 +55,6 @@ class Search extends Component {
5455
}
5556
}
5657

57-
5858
const getEntered = state => state.Search.entered;
5959
const getGenres = state => state.Search.cache[state.Search.entered] || [];
6060
const getCache = state => state.Search.cache;
@@ -104,9 +104,7 @@ const mapDispatchToProps = dispatch => {
104104
}
105105
}
106106

107-
108107
export default connect(
109108
mapStateToProps,
110109
mapDispatchToProps
111-
)(Search);
112-
110+
)(Search);
File renamed without changes.

src/View/shared/Artist.jsx renamed to src/View/shared/Artist/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { Card } from 'react-bootstrap';
33
import { Link } from "react-router-dom";
4-
import Favorites from './Favorites';
4+
import Favorites from '../Favorite';
55
import './artist.css'
66

77
const Artist = (props) => {
File renamed without changes.

src/View/shared/Favorites.jsx renamed to src/View/shared/Favorite/index.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import React, {Component} from 'react';
22
import { connect } from 'react-redux';
33
import { Button } from 'react-bootstrap';
4-
import { addFavorite, removeFavorite } from '../Saved/types';
4+
import { addFavorite, removeFavorite } from '../../Saved/types';
55
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
66
import faHeart from '@fortawesome/fontawesome-free-solid/faHeart';
77
import './favorite.css';
88

99
class Favorites extends Component {
1010
render(){
1111
let {artist, isFavorite , handleAddFavorite, handleRemoveFavorite} = this.props,
12-
onclick = () => {
13-
if (isFavorite){
14-
handleRemoveFavorite(artist);
15-
} else {
16-
handleAddFavorite(artist);
17-
}
18-
};
12+
onclick = () => {
13+
if (isFavorite){
14+
handleRemoveFavorite(artist);
15+
} else {
16+
handleAddFavorite(artist);
17+
}
18+
};
1919

2020
if (isFavorite){
2121
return <Button className="favorite" title="I am a favorite" onClick={onclick} variant="primary"><FontAwesomeIcon icon={faHeart} /></Button>

src/View/view.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
nav {
22
float: right;
3-
.favorites-link {
4-
5-
}
63
}
74

85
h1 {

0 commit comments

Comments
 (0)