saleor-dashboard/src/plugins/components/PluginsListPage/PluginsListPage.tsx

38 lines
1.1 KiB
TypeScript
Raw Normal View History

2019-08-21 14:30:56 +00:00
import React from "react";
2019-08-30 13:10:07 +00:00
import { useIntl } from "react-intl";
2019-08-21 14:30:56 +00:00
import AppHeader from "@saleor/components/AppHeader";
import Container from "@saleor/components/Container";
import PageHeader from "@saleor/components/PageHeader";
2019-08-30 13:10:07 +00:00
import { sectionNames } from "@saleor/intl";
2019-12-17 17:13:56 +00:00
import { PageListProps, SortPage } from "@saleor/types";
import { PluginListUrlSortField } from "@saleor/plugins/urls";
2019-08-28 14:53:57 +00:00
import { Plugins_plugins_edges_node } from "../../types/Plugins";
2019-08-21 14:30:56 +00:00
import PluginsList from "../PluginsList/PluginsList";
2019-12-17 17:13:56 +00:00
export interface PluginsListPageProps
extends PageListProps,
SortPage<PluginListUrlSortField> {
2019-08-28 14:53:57 +00:00
plugins: Plugins_plugins_edges_node[];
2019-08-21 14:30:56 +00:00
onBack: () => void;
}
const PluginsListPage: React.FC<PluginsListPageProps> = ({
2019-08-21 14:30:56 +00:00
onBack,
2019-12-17 17:13:56 +00:00
...listProps
2019-08-30 13:10:07 +00:00
}) => {
const intl = useIntl();
2019-12-17 17:13:56 +00:00
2019-08-30 13:10:07 +00:00
return (
<Container>
<AppHeader onBack={onBack}>
2019-08-30 14:15:32 +00:00
{intl.formatMessage(sectionNames.configuration)}
2019-08-30 13:10:07 +00:00
</AppHeader>
<PageHeader title={intl.formatMessage(sectionNames.plugins)} />
2019-12-17 17:13:56 +00:00
<PluginsList {...listProps} />
2019-08-30 13:10:07 +00:00
</Container>
);
};
2019-08-21 14:30:56 +00:00
PluginsListPage.displayName = "PluginsListPage";
export default PluginsListPage;