Improve error screen for not found share link

This commit is contained in:
Tom Moor
2018-05-26 12:22:14 -07:00
parent 6662e2666d
commit 8c62b6e07a
4 changed files with 16 additions and 21 deletions

View File

@ -108,7 +108,7 @@ Outline is still built and maintained by a small team we'd love your help to
However, before working on a pull request please let the core team know by creating or commenting in an issue on [GitHub](https://www.github.com/outline/outline/issues), and we'd also love to hear from you in our [Spectrum community](https://spectrum.chat/outline). This way we can ensure that an approach is agreed on before code is written and will hopefully help to get your contributions integrated faster!
If you're looking for ways to get started, here's a list of ways to help us improve Outline:
If youre looking for ways to get started, here's a list of ways to help us improve Outline:
* Issues with [`good first issue`](https://github.com/outline/outline/labels/good%20first%20issue) label
* Performance improvements, both on server and frontend

View File

@ -31,6 +31,7 @@ import LoadingIndicator from 'components/LoadingIndicator';
import CenteredContent from 'components/CenteredContent';
import PageTitle from 'components/PageTitle';
import Search from 'scenes/Search';
import Error404 from 'scenes/Error404';
const AUTOSAVE_INTERVAL = 3000;
const DISCARD_CHANGES = `
@ -237,7 +238,7 @@ class DocumentScene extends React.Component<Props> {
const isShare = match.params.shareId;
if (this.notFound) {
return <Search notFound />;
return isShare ? <Error404 /> : <Search notFound />;
}
return (

View File

@ -1,25 +1,19 @@
// @flow
import * as React from 'react';
import { Link } from 'react-router-dom';
import CenteredContent from 'components/CenteredContent';
import PageTitle from 'components/PageTitle';
class Error404 extends React.Component<*> {
render() {
return (
<CenteredContent>
<PageTitle title="Not found" />
<h1>Not Found</h1>
<p>We're unable to find the page you're accessing.</p>
<p>
Maybe you want to try <Link to="/search">search</Link> instead?
</p>
</CenteredContent>
);
}
}
const Error404 = () => {
return (
<CenteredContent>
<PageTitle title="Not Found" />
<h1>Not Found</h1>
<p>We were unable to find the page youre looking for.</p>
<p>
Go to <a href="/">homepage</a>.
</p>
</CenteredContent>
);
};
export default Error404;

View File

@ -121,7 +121,7 @@ class Search extends React.Component<Props> {
@action
loadMoreResults = async () => {
// Don't paginate if there aren't more results or we're in the middle of fetching
// Don't paginate if there aren't more results or were in the middle of fetching
if (!this.allowLoadMore || this.isFetching) return;
// Fetch more results