diff --git a/src/SqlStreamStoreBrowser.tsx b/src/SqlStreamStoreBrowser.tsx index 50493ac..c96fd63 100644 --- a/src/SqlStreamStoreBrowser.tsx +++ b/src/SqlStreamStoreBrowser.tsx @@ -33,7 +33,7 @@ const getSelfAlias = (links: HalLinks) => .flatMap(rel => links[rel]) .filter(({ rel }) => rel && rel.indexOf('streamStore:') === 0) .filter( - ({ rel, href }) => + ({ href }) => !!links.self.filter(link => link.href === href).length, ) .map(({ rel }) => rel); @@ -58,7 +58,7 @@ const state$ = createState( store.hal$.links$.map(links => ['_links', () => links]), store.hal$.forms$.map(forms => ['forms', () => forms]), store.hal$.loading$.map(loading => ['loading', () => loading]), - store.hal$.mediaType$.map(mediaType => ['mediaType', () => mediaType]), + store.mediaType$.map(mediaType => ['mediaType', () => mediaType]), themes.theme$.map(theme => ['theme', () => theme]), ), obs.of({ diff --git a/src/components/AuthorizationProvider.tsx b/src/components/AuthorizationProvider.tsx index b91f950..fe7866d 100644 --- a/src/components/AuthorizationProvider.tsx +++ b/src/components/AuthorizationProvider.tsx @@ -1,4 +1,4 @@ -import React, { ComponentType, ReactNode, StatelessComponent } from 'react'; +import React, { ComponentType, FunctionComponent, ReactNode } from 'react'; import { AuthorizationProps } from 'types'; import getDisplayName from './getDisplayName'; @@ -6,7 +6,7 @@ const { Consumer, Provider } = React.createContext( undefined, ); -const AuthorizationProvider: StatelessComponent< +const AuthorizationProvider: FunctionComponent< AuthorizationProps & { children: ReactNode; } diff --git a/src/components/HyperMediaControls/Dialog.tsx b/src/components/HyperMediaControls/Dialog.tsx index 8926ba3..ef345ba 100644 --- a/src/components/HyperMediaControls/Dialog.tsx +++ b/src/components/HyperMediaControls/Dialog.tsx @@ -11,7 +11,7 @@ import { } from '@material-ui/core'; import { SlideProps } from '@material-ui/core/Slide'; import RelIcon from 'components/RelIcon'; -import React, { FormEvent, PureComponent, StatelessComponent } from 'react'; +import React, { FormEvent, FunctionComponent, PureComponent } from 'react'; import { HalLink } from 'types'; import HelpButton from './HelpButton'; import RelButton from './RelButton'; @@ -22,7 +22,7 @@ const styles = (theme: Theme) => ({ }, }); -const SlideUp: StatelessComponent = props => ( +const SlideUp: FunctionComponent = props => ( ); diff --git a/src/components/HyperMediaControls/RelButton.tsx b/src/components/HyperMediaControls/RelButton.tsx index 02ed47e..88feea8 100644 --- a/src/components/HyperMediaControls/RelButton.tsx +++ b/src/components/HyperMediaControls/RelButton.tsx @@ -1,14 +1,14 @@ import { Button } from '@material-ui/core'; import { ButtonProps } from '@material-ui/core/Button'; import RelIcon from 'components/RelIcon'; -import React, { StatelessComponent } from 'react'; +import React, { FunctionComponent } from 'react'; interface RelButtonProps { rel: string; title?: string; } -const RelButton: StatelessComponent = ({ +const RelButton: FunctionComponent = ({ rel, onClick, title, diff --git a/src/components/NavigationLinks.tsx b/src/components/NavigationLinks.tsx index 825c89c..0fb4266 100644 --- a/src/components/NavigationLinks.tsx +++ b/src/components/NavigationLinks.tsx @@ -2,8 +2,8 @@ import { IconButton } from '@material-ui/core'; import React, { ComponentType, FormEventHandler, + FunctionComponent, PureComponent, - StatelessComponent, } from 'react'; import { navigation } from 'stream-store'; import { HalLink, HalLinks, NavigatableProps } from 'types'; @@ -45,7 +45,7 @@ interface NavigationLinksProps { _links: HalLinks; } -const NavigationLinks: StatelessComponent = ({ +const NavigationLinks: FunctionComponent = ({ _links, }) => (