diff --git a/app/components/Modals/Modals.js b/app/components/Modals/Modals.js index 4402415c..d9a2c23c 100644 --- a/app/components/Modals/Modals.js +++ b/app/components/Modals/Modals.js @@ -46,7 +46,7 @@ class Modals extends React.Component { - + diff --git a/app/scenes/DocumentShare/DocumentShare.js b/app/scenes/DocumentShare/DocumentShare.js index 4ddace7d..025e4258 100644 --- a/app/scenes/DocumentShare/DocumentShare.js +++ b/app/scenes/DocumentShare/DocumentShare.js @@ -2,6 +2,7 @@ import * as React from 'react'; import { observable } from 'mobx'; import { observer } from 'mobx-react'; +import { Link } from 'react-router-dom'; import Input from 'components/Input'; import Button from 'components/Button'; import CopyToClipboard from 'components/CopyToClipboard'; @@ -9,8 +10,8 @@ import HelpText from 'components/HelpText'; import Document from 'models/Document'; type Props = { - document: Document, - onCopyLink: () => *, + document?: Document, + onSubmit: () => *, }; @observer @@ -27,19 +28,23 @@ class DocumentShare extends React.Component { this.timeout = setTimeout(() => { this.isCopied = false; - this.props.onCopyLink(); - }, 2000); + this.props.onSubmit(); + }, 1500); }; render() { - const { document } = this.props; + const { document, onSubmit } = this.props; + if (!document) return null; return (
- The link below allows anyone to access a read-only version of the - document {document.title}. You can revoke this link - in settings at any time. + The link below allows anyone in the world to access a read-only + version of the document {document.title}. You can + revoke this link in settings at any time.{' '} + + Manage share links + .