1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 07:10:05 +02:00
copilot/spikes/architecture/react-d3/client/graph.js
Tom Gallacher 9d3903a1db Implement d3 avg rendering in react
This is an initial implement that at the moment constructs the required
SVG layout to be used by D3.
2016-12-02 11:02:58 +00:00

27 lines
429 B
JavaScript

const ReactRedux = require('react-redux');
const React = require('react');
const Links = require('./links');
const Nodes = require('./nodes');
const {
connect
} = ReactRedux;
const Component = (props) =>
<svg width='960' height='600'>
<Links {...props}/>
<Nodes {...props}/>
</svg>;
const mapStateToProps = ({
data
}) => {
return {
data
};
};
module.exports = connect(
mapStateToProps
)(Component);