Vulcan/packages/vulcan-debug/lib/components/Routes.jsx
2019-01-08 16:15:19 +01:00

31 lines
700 B
JavaScript

import React from 'react';
import {registerComponent, Components, Routes} from 'meteor/vulcan:lib';
import {Link} from 'react-router';
const RoutePath = ({document}) => (
<Link to={document.path}>{document.path}</Link>
);
const RoutesDashboard = props => {
return (
<div className="routes">
<Components.Datatable
showSearch={false}
showNew={false}
showEdit={false}
data={Object.values(Routes)}
columns={[
'name',
{
name: 'path',
component: RoutePath,
},
'componentName',
'layoutName'
]}
/>
</div>
);
};
registerComponent('Routes', RoutesDashboard);