mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
31 lines
700 B
JavaScript
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);
|