Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 7eaf543

Browse files
Merge pull request #77 from thefringeninja/moving
Refactor and Update Dependencies
2 parents ca370ea + cef198e commit 7eaf543

21 files changed

+148
-96
lines changed

src/SqlStreamStoreBrowser.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const getSelfAlias = (links: HalLinks) =>
3333
.flatMap(rel => links[rel])
3434
.filter(({ rel }) => rel && rel.indexOf('streamStore:') === 0)
3535
.filter(
36-
({ rel, href }) =>
36+
({ href }) =>
3737
!!links.self.filter(link => link.href === href).length,
3838
)
3939
.map(({ rel }) => rel);
@@ -58,7 +58,7 @@ const state$ = createState<SqlStreamStoreBrowserState>(
5858
store.hal$.links$.map(links => ['_links', () => links]),
5959
store.hal$.forms$.map(forms => ['forms', () => forms]),
6060
store.hal$.loading$.map(loading => ['loading', () => loading]),
61-
store.hal$.mediaType$.map(mediaType => ['mediaType', () => mediaType]),
61+
store.mediaType$.map(mediaType => ['mediaType', () => mediaType]),
6262
themes.theme$.map(theme => ['theme', () => theme]),
6363
),
6464
obs.of({

src/components/AuthorizationProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import React, { ComponentType, ReactNode, StatelessComponent } from 'react';
1+
import React, { ComponentType, FunctionComponent, ReactNode } from 'react';
22
import { AuthorizationProps } from 'types';
33
import getDisplayName from './getDisplayName';
44

55
const { Consumer, Provider } = React.createContext<string | undefined>(
66
undefined,
77
);
88

9-
const AuthorizationProvider: StatelessComponent<
9+
const AuthorizationProvider: FunctionComponent<
1010
AuthorizationProps & {
1111
children: ReactNode;
1212
}

src/components/HyperMediaControls/Dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from '@material-ui/core';
1212
import { SlideProps } from '@material-ui/core/Slide';
1313
import RelIcon from 'components/RelIcon';
14-
import React, { FormEvent, PureComponent, StatelessComponent } from 'react';
14+
import React, { FormEvent, FunctionComponent, PureComponent } from 'react';
1515
import { HalLink } from 'types';
1616
import HelpButton from './HelpButton';
1717
import RelButton from './RelButton';
@@ -22,7 +22,7 @@ const styles = (theme: Theme) => ({
2222
},
2323
});
2424

25-
const SlideUp: StatelessComponent<SlideProps> = props => (
25+
const SlideUp: FunctionComponent<SlideProps> = props => (
2626
<Slide direction={'up'} {...props} />
2727
);
2828

src/components/HyperMediaControls/RelButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { Button } from '@material-ui/core';
22
import { ButtonProps } from '@material-ui/core/Button';
33
import RelIcon from 'components/RelIcon';
4-
import React, { StatelessComponent } from 'react';
4+
import React, { FunctionComponent } from 'react';
55

66
interface RelButtonProps {
77
rel: string;
88
title?: string;
99
}
1010

11-
const RelButton: StatelessComponent<RelButtonProps & ButtonProps> = ({
11+
const RelButton: FunctionComponent<RelButtonProps & ButtonProps> = ({
1212
rel,
1313
onClick,
1414
title,

src/components/NavigationLinks.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { IconButton } from '@material-ui/core';
22
import React, {
33
ComponentType,
44
FormEventHandler,
5+
FunctionComponent,
56
PureComponent,
6-
StatelessComponent,
77
} from 'react';
88
import { navigation } from 'stream-store';
99
import { HalLink, HalLinks, NavigatableProps } from 'types';
@@ -45,7 +45,7 @@ interface NavigationLinksProps {
4545
_links: HalLinks;
4646
}
4747

48-
const NavigationLinks: StatelessComponent<NavigationLinksProps> = ({
48+
const NavigationLinks: FunctionComponent<NavigationLinksProps> = ({
4949
_links,
5050
}) => (
5151
<nav>

src/components/NavigationProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { ComponentType, ReactNode, StatelessComponent } from 'react';
1+
import React, { ComponentType, FunctionComponent, ReactNode } from 'react';
22
import { NavigatableProps, NavigationHandler } from 'types';
33
import getDisplayName from './getDisplayName';
44

@@ -10,7 +10,7 @@ const { Consumer, Provider } = React.createContext<NavigationHandler>(
1010
defaultNavigationHandler,
1111
);
1212

13-
const NavigationProvider: StatelessComponent<{
13+
const NavigationProvider: FunctionComponent<{
1414
onNavigate: NavigationHandler;
1515
children: ReactNode;
1616
}> = ({ onNavigate, children }) => (

src/stream-store/Viewer/HalViewer/Home.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Table } from 'components';
22
import inflector from 'inflector-js';
3-
import React, { ComponentType, StatelessComponent } from 'react';
3+
import React, { ComponentType, FunctionComponent } from 'react';
44
import { connect, createState } from 'reactive';
55
import { Observable as obs } from 'rxjs';
66
import rels from 'stream-store/rels';
@@ -63,7 +63,7 @@ const state$ = createState<IndexState>(
6363
obs.of<IndexState>({ recent: [], info: [] }),
6464
);
6565

66-
const InfoLine: StatelessComponent<InfoLineProps> = ({ id, value }) => (
66+
const InfoLine: FunctionComponent<InfoLineProps> = ({ id, value }) => (
6767
<Table.Row>
6868
<Table.Cell>
6969
<strong>{id}</strong>
@@ -72,7 +72,7 @@ const InfoLine: StatelessComponent<InfoLineProps> = ({ id, value }) => (
7272
</Table.Row>
7373
);
7474

75-
const Info: StatelessComponent<InfoState> = ({ info }) => (
75+
const Info: FunctionComponent<InfoState> = ({ info }) => (
7676
<Table>
7777
<Table.Head>
7878
<Table.Row>

src/stream-store/Viewer/HalViewer/Stream.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Table } from 'components';
2-
import React, { ComponentType, StatelessComponent } from 'react';
2+
import React, { ComponentType, FunctionComponent } from 'react';
33
import { connect, createState } from 'reactive';
44
import { Observable as obs } from 'rxjs';
55
import rels from 'stream-store/rels';
@@ -37,7 +37,7 @@ interface MessagesState {
3737
messages: Array<Message & HalResource>;
3838
}
3939

40-
const Messages: StatelessComponent<MessagesState> = ({ messages }) => (
40+
const Messages: FunctionComponent<MessagesState> = ({ messages }) => (
4141
<Table>
4242
<StreamHeader />
4343
<Table.Body>

src/stream-store/Viewer/HalViewer/StreamMetadata.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Hyperlink, Table } from 'components';
2-
import React, { CSSProperties, StatelessComponent } from 'react';
2+
import React, { CSSProperties, FunctionComponent } from 'react';
33
import { connect, createState } from 'reactive';
44
import { Observable as obs } from 'rxjs';
55
import rels from 'stream-store/rels';
@@ -49,7 +49,7 @@ interface StreamMetadataDetailsProps {
4949
_links: HalLinks;
5050
}
5151

52-
const StreamMetadataDetails: StatelessComponent<StreamMetadataDetailsProps> = ({
52+
const StreamMetadataDetails: FunctionComponent<StreamMetadataDetailsProps> = ({
5353
streamId,
5454
maxAge,
5555
maxCount,
@@ -68,7 +68,7 @@ const StreamMetadataDetails: StatelessComponent<StreamMetadataDetailsProps> = ({
6868
</Table.Row>
6969
);
7070

71-
const StreamMetadata: StatelessComponent<
71+
const StreamMetadata: FunctionComponent<
7272
StreamMetadataState & HalViewerProps
7373
> = ({ metadata }) => (
7474
<section>

src/stream-store/Viewer/HalViewer/components/StreamMessageDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Hyperlink, Table } from 'components';
2-
import React, { CSSProperties, StatelessComponent } from 'react';
2+
import React, { CSSProperties, FunctionComponent } from 'react';
33
import rels from 'stream-store/rels';
44
import { HalResource } from 'types';
55

@@ -14,7 +14,7 @@ interface StreamMessageDetailsProps {
1414
type: string;
1515
}
1616

17-
const StreamMessageDetails: StatelessComponent<
17+
const StreamMessageDetails: FunctionComponent<
1818
StreamMessageDetailsProps & HalResource
1919
> = ({
2020
messageId,

0 commit comments

Comments
 (0)