mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 00:45:44 +01:00
use reflow to migrate from flow to typescript
This commit is contained in:
32
scm-ui/ui-webapp/src/admin/plugins/components/PluginList.tsx
Normal file
32
scm-ui/ui-webapp/src/admin/plugins/components/PluginList.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import React from 'react';
|
||||
import { Plugin } from '@scm-manager/ui-types';
|
||||
import PluginGroupEntry from '../components/PluginGroupEntry';
|
||||
import groupByCategory from './groupByCategory';
|
||||
|
||||
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 => {
|
||||
return (
|
||||
<PluginGroupEntry
|
||||
group={group}
|
||||
key={group.name}
|
||||
refresh={refresh}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PluginList;
|
||||
Reference in New Issue
Block a user