import React from 'react'
import references from '../../règles/références/références.yaml'
import './References.css'
import R from 'ramda'
export default ({refs}) => (
{R.toPairs(refs).map(
([name, link]) => {
let refkey = Object.keys(references).find(r => link.indexOf(r) > -1),
refData = refkey && references[refkey] || {},
domain = (link.indexOf("://") > -1
? link.split('/')[2]
: link.split('/')[0]).replace('www.', '')
return -
{domain}
{refData.image &&
}
{name}
})}
)