30 lines
648 B
JavaScript
30 lines
648 B
JavaScript
const React = require('react')
|
|
const Share = require('./Share')
|
|
const getHtml = require('../lib/component').getHtml
|
|
|
|
const Head = ({url, children}) => (
|
|
!url
|
|
? <h1>{children}</h1>
|
|
: <a href={url}><h2>{children}</h2></a>
|
|
)
|
|
|
|
const TeacherProfile = ({picture, name, url, profile, biography, shareable}) => (
|
|
<div className="teacher-profile">
|
|
<div className="teacher-profile__picture">
|
|
<img src={picture.url}/>
|
|
</div>
|
|
|
|
<div className="teacher-profile__info">
|
|
<div className="teacher-profile__biography">
|
|
{getHtml(biography)}
|
|
</div>
|
|
</div>
|
|
|
|
{!shareable ? null : (
|
|
<Share/>
|
|
)}
|
|
</div>
|
|
)
|
|
|
|
module.exports = TeacherProfile
|