1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2024-12-22 17:23:22 +01:00

Merge pull request #2 from kremalicious/fix/codeclimate

refactor
This commit is contained in:
Matthias Kretschmann 2018-05-22 23:09:36 +02:00 committed by GitHub
commit ef28bf15a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 13 deletions

View File

@ -8,7 +8,8 @@
<a href="https://matthiaskretschmann.com">matthiaskretschmann.com</a> <a href="https://matthiaskretschmann.com">matthiaskretschmann.com</a>
</p> </p>
<p align="center"> <p align="center">
<a href="https://travis-ci.com/kremalicious/portfolio"><img src="https://travis-ci.com/kremalicious/portfolio.svg?branch=master" /></a> <a href="https://travis-ci.com/kremalicious/portfolio"><img src="https://travis-ci.com/kremalicious/portfolio.svg?branch=master" /></a>
<a href="https://codeclimate.com/github/kremalicious/portfolio/maintainability"><img src="https://api.codeclimate.com/v1/badges/8f561ec93e0f8c6b15d9/maintainability" /></a>
<a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/kremalicious/portfolio.svg" /></a> <a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/kremalicious/portfolio.svg" /></a>
</p> </p>

View File

@ -2,21 +2,19 @@ import React from 'react'
import CSSTransition from 'react-transition-group/CSSTransition' import CSSTransition from 'react-transition-group/CSSTransition'
import './Animations.scss' import './Animations.scss'
const Animation = props => <CSSTransition appear={true} in={true} {...props} />
export const FadeIn = props => ( export const FadeIn = props => (
<CSSTransition <Animation
classNames="fadein" classNames="fadein"
appear={true}
in={true}
timeout={{ enter: 200, exit: 200, appear: 200 }} timeout={{ enter: 200, exit: 200, appear: 200 }}
{...props} {...props}
/> />
) )
export const MoveIn = props => ( export const MoveIn = props => (
<CSSTransition <Animation
classNames="movein" classNames="movein"
appear={true}
in={true}
timeout={{ enter: 300, exit: 200, appear: 300 }} timeout={{ enter: 300, exit: 200, appear: 300 }}
{...props} {...props}
/> />

View File

@ -278,7 +278,6 @@ vCard.prototype = {
* @return {String} * @return {String}
*/ */
toString: function(version, charset) { toString: function(version, charset) {
// eslint-disable-line no-unused-vars
version = version || this.version version = version || this.version
return vCard.format(this, version) return vCard.format(this, version)
}, },

View File

@ -11,6 +11,17 @@ import ProjectNav from '../components/molecules/ProjectNav'
import SEO from '../components/atoms/SEO' import SEO from '../components/atoms/SEO'
import './Project.scss' import './Project.scss'
const ProjectMeta = props => {
const { links, techstack } = props
return (
<footer className="project__meta">
{!!links && <ProjectLinks links={links} />}
{!!techstack && <ProjectTechstack techstack={techstack} />}
</footer>
)
}
class Project extends Component { class Project extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
@ -27,7 +38,6 @@ class Project extends Component {
const project = this.props.data.projectsYaml const project = this.props.data.projectsYaml
const projectImages = this.props.data.projectImages.edges const projectImages = this.props.data.projectImages.edges
const pathContext = this.props.pathContext const pathContext = this.props.pathContext
const { title, links, techstack } = project const { title, links, techstack } = project
const { next, previous } = pathContext const { next, previous } = pathContext
@ -53,10 +63,7 @@ class Project extends Component {
))} ))}
</FullWidth> </FullWidth>
<footer className="project__meta"> <ProjectMeta links={links} techstack={techstack} />
{!!links && <ProjectLinks links={links} />}
{!!techstack && <ProjectTechstack techstack={techstack} />}
</footer>
</Content> </Content>
</article> </article>
@ -66,6 +73,11 @@ class Project extends Component {
} }
} }
ProjectMeta.propTypes = {
links: PropTypes.array,
techstack: PropTypes.array
}
Project.propTypes = { Project.propTypes = {
data: PropTypes.object.isRequired, data: PropTypes.object.isRequired,
pathContext: PropTypes.object.isRequired pathContext: PropTypes.object.isRequired