diff --git a/app/assets/lost_blob.png b/app/assets/lost_blob.png new file mode 100644 index 00000000..5ef0fb25 Binary files /dev/null and b/app/assets/lost_blob.png differ diff --git a/app/components/dataset/Preview.tsx b/app/components/dataset/Preview.tsx index b5e080f7..bb26b62b 100644 --- a/app/components/dataset/Preview.tsx +++ b/app/components/dataset/Preview.tsx @@ -5,6 +5,7 @@ import { FetchOptions } from '../../store/api' import { BACKEND_URL } from '../../constants' import Dataset from './Dataset' +import PreviewNotFound from './PreviewNotFound' import SpinnerWithIcon from '../chrome/SpinnerWithIcon' interface PreviewProps { @@ -50,9 +51,11 @@ const Preview: React.FunctionComponent = (props) => { fetchDataset() }, [peername, name, path]) - // TODO (ramfox): what does an error screen look like here? or do we just nav - // back to the network/home & pop up a toast? if (error !== '') { + if (error.includes('not found')) { + return + } + return (
{ + return ( +
+
+ +

We can't get you this version... because we don't have it!

+

This isn't a problem or error with Qri. It just means that, although we know this version exists, the author of this dataset hasn't published it :)

+
+
+ ) +} + +export default PreviewNotFound diff --git a/app/scss/0.4.0/preview.scss b/app/scss/0.4.0/preview.scss new file mode 100644 index 00000000..21916196 --- /dev/null +++ b/app/scss/0.4.0/preview.scss @@ -0,0 +1,16 @@ +.preview-not-found { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + .container { + width: 400px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + .graphic { + width: 200px; + } + } +} \ No newline at end of file diff --git a/app/scss/style.scss b/app/scss/style.scss index 2bdecbb5..4e7f3734 100755 --- a/app/scss/style.scss +++ b/app/scss/style.scss @@ -52,3 +52,4 @@ @import "0.4.0/form"; @import "0.4.0/network"; @import "0.4.0/dataset"; +@import "0.4.0/preview";