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