mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-28 16:07:49 +01:00
fix some things
This commit is contained in:
@@ -177,7 +177,7 @@ export class DocumentEditComponent extends React.PureComponent<
|
||||
public copyLink() {
|
||||
const doc = this.props.allDocs[this.state.id];
|
||||
navigator.clipboard.writeText(
|
||||
`http://${webRoot}/shared/${this.props.username}/${doc.id}`,
|
||||
`${webRoot}/shared/${this.props.username}/${doc.id}`,
|
||||
);
|
||||
showSharedToast();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ export class DocumentViewComponent extends React.PureComponent<
|
||||
const { id } = this.props.match.params as any;
|
||||
if (this.props.allDocs) {
|
||||
const doc = this.props.allDocs[id];
|
||||
|
||||
if (!doc) {
|
||||
return <NotFound />;
|
||||
}
|
||||
|
||||
@@ -13,13 +13,11 @@ export function DocumentsList(props: IDocumentListProps) {
|
||||
const cards = props.docs.map(doc => (
|
||||
<DocumentCard key={doc.id} doc={doc} />
|
||||
));
|
||||
if (props.newDocument) {
|
||||
return (
|
||||
<div className="list">
|
||||
{<NewDocumentCard />}
|
||||
{cards}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return <div className="list">{cards}</div>;
|
||||
|
||||
return (
|
||||
<div className="list">
|
||||
{props.newDocument && <NewDocumentCard />}
|
||||
{cards}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user