refactor homepage

This commit is contained in:
jinhojang6 2020-02-04 00:45:20 +09:00
parent 88c8fc3102
commit 5519f59e65
No known key found for this signature in database
GPG Key ID: 0E7AA62CB0D9E6F3

View File

@ -1,4 +1,4 @@
import React, { Component } from 'react' import React, { Component, Fragment } from 'react'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import ProgressiveImage from 'react-progressive-image' import ProgressiveImage from 'react-progressive-image'
@ -9,7 +9,7 @@ import '../css/HomePage.styles.css'
class HomePage extends Component { class HomePage extends Component {
displayGrid = () => { displayGrid = () => {
return podcasts.map(podcast => ( const gridPodcasts = podcasts.map(podcast => (
<Link <Link
key={podcast.name} key={podcast.name}
className="Home-podcast" className="Home-podcast"
@ -34,6 +34,11 @@ class HomePage extends Component {
</div> </div>
</Link> </Link>
)) ))
return (
<Fragment>
{gridPodcasts}
</Fragment>
)
} }
sortByCategory = () => { sortByCategory = () => {
@ -81,7 +86,7 @@ class HomePage extends Component {
return ( return (
<div className={`Home ${theme}`}> <div className={`Home ${theme}`}>
<div className="Home-banner"> <div className="Home-banner">
<h1>Podcasts</h1> <h1>Status Podcasts</h1>
<div> <div>
<i <i
className={`fas fa-list icon ${ className={`fas fa-list icon ${