Commit c0ba39ba authored by 吕祺's avatar 吕祺 ⛹🏽

fix

parent aeabcb13
This diff is collapsed.
This diff is collapsed.
import React, { Component } from 'react'
import classnames from 'classnames'
import portfolioPage from '../content/portfolioPage.md'
import portfolioChi from '../content/portfolioChi.md'
import portfolioEnglish from '../content/portfolioEN.md'
import { ThemeContext } from './_app.js'
import Header from '../components/Header'
import Footer from '../components/Footer'
......@@ -91,7 +93,6 @@ export default class PortfolioPage extends Component {
newTechEN,
health,
healthEN,
portfolio,
subTitle,
subTitleEN,
officialSite,
......@@ -102,6 +103,8 @@ export default class PortfolioPage extends Component {
dayEN
}
} = portfolioPage
const {attributes: portfolio } = portfolioChi
const {attributes: portfolioEN } = portfolioEnglish
const { showType, selected, mounted } = this.state
return (
<ThemeContext.Consumer>
......@@ -177,12 +180,18 @@ export default class PortfolioPage extends Component {
</div>
</div>
<div className="portfolio">
{portfolio
{en === null || !en && (portfolio
.filter((p) => {
if (showType === 'all') return true
return p.type === showType
})
.map((p, idx) => this.renderPortfolio(p, idx, mounted))}
.map((p, idx) => this.renderPortfolio(p, idx, mounted)))}
{en && (portfolioEN
.filter((p) => {
if (showType === 'all') return true
return p.type === showType
})
.map((p, idx) => this.renderPortfolio(p, idx, mounted)))}
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment