refactor: flow typing (#1012)
* fix: padding * fix: Minor button alignment issues * feat: Add icon to invite people button * WIP
This commit is contained in:
@@ -6,7 +6,7 @@ import breakpoint from 'styled-components-breakpoint';
|
||||
import { observable } from 'mobx';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import { Prompt, Route, withRouter } from 'react-router-dom';
|
||||
import type { Location } from 'react-router-dom';
|
||||
import type { Location, RouterHistory } from 'react-router-dom';
|
||||
import keydown from 'react-keydown';
|
||||
import Flex from 'shared/components/Flex';
|
||||
import {
|
||||
@@ -59,7 +59,7 @@ Are you sure you want to discard them?
|
||||
|
||||
type Props = {
|
||||
match: Object,
|
||||
history: Object,
|
||||
history: RouterHistory,
|
||||
location: Location,
|
||||
documents: DocumentsStore,
|
||||
revisions: RevisionsStore,
|
||||
|
||||
@@ -10,7 +10,6 @@ type Props = {
|
||||
document: Document,
|
||||
anchor: string,
|
||||
showCollection?: boolean,
|
||||
ref?: *,
|
||||
};
|
||||
|
||||
const DocumentLink = styled(Link)`
|
||||
|
||||
@@ -26,12 +26,12 @@ type Props = {
|
||||
documents: DocumentsStore,
|
||||
collections: CollectionsStore,
|
||||
ui: UiStore,
|
||||
onRequestClose: *,
|
||||
onRequestClose: () => void,
|
||||
};
|
||||
|
||||
@observer
|
||||
class DocumentMove extends React.Component<Props> {
|
||||
firstDocument: *;
|
||||
firstDocument: ?PathToDocument;
|
||||
@observable searchTerm: ?string;
|
||||
@observable isSaving: boolean;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ type Props = {
|
||||
};
|
||||
|
||||
class DocumentEditor extends React.Component<Props> {
|
||||
editor: *;
|
||||
editor: ?Editor;
|
||||
|
||||
componentDidMount() {
|
||||
if (!this.props.defaultValue) {
|
||||
|
||||
@@ -32,12 +32,12 @@ type Props = {
|
||||
isPublishing: boolean,
|
||||
publishingIsDisabled: boolean,
|
||||
savingIsDisabled: boolean,
|
||||
onDiscard: () => *,
|
||||
onDiscard: () => void,
|
||||
onSave: ({
|
||||
done?: boolean,
|
||||
publish?: boolean,
|
||||
autosave?: boolean,
|
||||
}) => *,
|
||||
}) => void,
|
||||
auth: AuthStore,
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ class Header extends React.Component<Props> {
|
||||
this.props.onSave({ done: true, publish: true });
|
||||
};
|
||||
|
||||
handleShareLink = async (ev: SyntheticEvent<*>) => {
|
||||
handleShareLink = async (ev: SyntheticEvent<>) => {
|
||||
const { document } = this.props;
|
||||
if (!document.shareUrl) await document.share();
|
||||
this.showShareModal = true;
|
||||
|
||||
Reference in New Issue
Block a user