Upgrade prettier

This commit is contained in:
Tom Moor
2017-11-10 14:14:30 -08:00
parent c737b613e4
commit ab13f51d5d
79 changed files with 780 additions and 533 deletions

View File

@@ -14,7 +14,8 @@ class DocumentViewersStore {
@observable viewers: Array<View>;
@observable isFetching: boolean;
@action fetchViewers = async () => {
@action
fetchViewers = async () => {
this.isFetching = true;
try {

View File

@@ -25,7 +25,8 @@ type Props = {
count: number,
};
@observer class DocumentViews extends Component {
@observer
class DocumentViews extends Component {
anchor: HTMLElement;
store: DocumentViewersStore;
props: Props;
@@ -55,19 +56,16 @@ type Props = {
return (
<Container align="center">
<a ref={this.setRef} onClick={this.openPopover}>
Viewed
{' '}
{this.props.count}
{' '}
{this.props.count === 1 ? 'time' : 'times'}
Viewed {this.props.count} {this.props.count === 1 ? 'time' : 'times'}
</a>
{this.state.opened &&
{this.state.opened && (
<Popover anchor={this.anchor} onClose={this.closePopover}>
<DocumentViewers
onMount={this.store.fetchViewers}
viewers={this.store.viewers}
/>
</Popover>}
</Popover>
)}
</Container>
);
}

View File

@@ -40,8 +40,7 @@ class DocumentViewers extends Component {
{map(this.props.viewers, view => (
<li key={view.user.id}>
<Flex align="center">
<Avatar src={view.user.avatarUrl} />
{' '}
<Avatar src={view.user.avatarUrl} />{' '}
<UserName>{view.user.name}</UserName>
</Flex>
</li>