diff --git a/ui/src/side_nav/containers/SideNav.tsx b/ui/src/side_nav/containers/SideNav.tsx index 39858227e1..b2788a58cf 100644 --- a/ui/src/side_nav/containers/SideNav.tsx +++ b/ui/src/side_nav/containers/SideNav.tsx @@ -1,6 +1,6 @@ import _ from 'lodash' import React, {PureComponent} from 'react' -import {withRouter, Link} from 'react-router' +import {withRouter, Link, WithRouterProps} from 'react-router' import {connect} from 'react-redux' import Authorized, {ADMIN_ROLE} from 'src/auth/Authorized' @@ -16,13 +16,10 @@ import { import {DEFAULT_HOME_PAGE} from 'src/shared/constants' import {ErrorHandling} from 'src/shared/decorators/errors' -import {Params, Location} from 'src/types/sideNav' import {Env, Source, Links, Me} from 'src/types' -interface Props { +interface OwnProps { sources: Source[] - params: Params - location: Location isHidden: boolean isUsingAuth?: boolean logoutLink?: string @@ -30,6 +27,10 @@ interface Props { me: Me env: Env } +type RouterProps = WithRouterProps<{ + sourceID: string +}> +type Props = OwnProps & RouterProps @ErrorHandling class SideNav extends PureComponent { diff --git a/ui/src/types/sideNav.ts b/ui/src/types/sideNav.ts deleted file mode 100644 index 0d75ab1231..0000000000 --- a/ui/src/types/sideNav.ts +++ /dev/null @@ -1,38 +0,0 @@ -export interface Params { - sourceID: string -} - -export interface Location { - pathname: string -} - -export interface ExternalLink { - name: string - url: string -} - -export interface ExternalLinks { - custom: ExternalLink[] -} - -export interface Links { - me?: string - external?: ExternalLinks -} - -export interface Organization { - id: string - name: string -} - -export interface Role { - id?: string - name?: string -} - -export interface Me { - name: string - currentOrganization: Organization - organizations: Organization[] - role: Role[] -}