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