18 lines
420 B
JavaScript
18 lines
420 B
JavaScript
import React from "react"
|
|
import PropTypes from "prop-types"
|
|
|
|
import { prettyDurationFromMinutes } from "../../utils"
|
|
|
|
export const Runtime = ({ runtime }) => {
|
|
if (runtime === 0) { return null; }
|
|
|
|
return (
|
|
<span>
|
|
<i className="fa fa-clock-o"></i>
|
|
{prettyDurationFromMinutes(runtime)}
|
|
</span>
|
|
);
|
|
}
|
|
Runtime.propTypes = { runtime: PropTypes.number };
|
|
Runtime.defaultProps = { runtime: 0 };
|