Fix location type

This commit is contained in:
Aleksandra Sikora 2020-06-05 21:31:57 +02:00
parent 78d2f2ced0
commit d651319110
2 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import * as React from 'react';
import { Connect } from 'react-redux';
import { LocationShape } from 'react-router/lib/PropTypes';
import { RouteComponentProps } from 'react-router';
import Sidebar from './Sidebar';
import PageContainer from '../../Common/Layout/PageContainer/PageContainer';
@ -11,7 +11,7 @@ type Metadata = {
};
type ExternalProps = {
location: LocationShape;
location: RouteComponentProps<{}, {}>['location'];
children: JSX.Element;
};

View File

@ -1,5 +1,5 @@
import React from 'react';
import { Link } from 'react-router';
import { Link, RouteComponentProps } from 'react-router';
import LeftContainer from '../../Common/Layout/LeftContainer/LeftContainer';
import CheckIcon from '../../Common/Icons/Check';
import CrossIcon from '../../Common/Icons/Cross';
@ -14,11 +14,16 @@ interface Metadata {
}
type SidebarProps = {
location: Location;
location: RouteComponentProps<{}, {}>['location'];
metadata: Metadata;
};
type SectionDataKey = 'actions' | 'status' | 'allowed-queries' | 'logout';
type SectionDataKey =
| 'actions'
| 'status'
| 'allowed-queries'
| 'logout'
| 'about';
interface SectionData {
key: SectionDataKey;