2019-10-20 18:02:52 +02:00
|
|
|
import React from "react";
|
|
|
|
|
import { Plugin } from "@scm-manager/ui-types";
|
|
|
|
|
import PluginGroupEntry from "../components/PluginGroupEntry";
|
|
|
|
|
import groupByCategory from "./groupByCategory";
|
2019-10-19 16:38:07 +02:00
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
plugins: Plugin[];
|
|
|
|
|
refresh: () => void;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class PluginList extends React.Component<Props> {
|
|
|
|
|
render() {
|
|
|
|
|
const { plugins, refresh } = this.props;
|
|
|
|
|
|
|
|
|
|
const groups = groupByCategory(plugins);
|
|
|
|
|
return (
|
|
|
|
|
<div className="content is-plugin-page">
|
|
|
|
|
{groups.map(group => {
|
2019-10-21 10:57:56 +02:00
|
|
|
return <PluginGroupEntry group={group} key={group.name} refresh={refresh} />;
|
2019-10-19 16:38:07 +02:00
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default PluginList;
|