mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* refactor(Data Sources): rename file to follow naming convention * refactor: use react-redux hooks for interacting with the store * tests: update data-sources list related test files * refactor: extract datasource list page contents * refactor: pass dataSources to the DataSourcesList as a prop * refactor: use proper typing for navIndex mocks
23 lines
628 B
TypeScript
23 lines
628 B
TypeScript
import React from 'react';
|
|
import { useSelector } from 'react-redux';
|
|
|
|
import { Page } from 'app/core/components/Page/Page';
|
|
import { getNavModel } from 'app/core/selectors/navModel';
|
|
import { StoreState } from 'app/types';
|
|
|
|
import { DataSourcesListPageContent } from './DataSourcesListPageContent';
|
|
|
|
export const DataSourcesListPage = () => {
|
|
const navModel = useSelector(({ navIndex }: StoreState) => getNavModel(navIndex, 'datasources'));
|
|
|
|
return (
|
|
<Page navModel={navModel}>
|
|
<Page.Contents>
|
|
<DataSourcesListPageContent />
|
|
</Page.Contents>
|
|
</Page>
|
|
);
|
|
};
|
|
|
|
export default DataSourcesListPage;
|