Renaming previewPath to previewFile to match existing path/file style.

This commit is contained in:
Roland 2023-02-15 21:05:34 -07:00
parent a82917fdf7
commit 87b179eeb9
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
5 changed files with 26 additions and 27 deletions

View file

@ -23,7 +23,8 @@ import {
HelpHeader,
isoDatetimeToString,
mimetypeColor,
PageContainer, PreviewLink,
PageContainer,
PreviewLink,
SearchInput,
TabLinks,
textEllipsis,
@ -68,14 +69,14 @@ function ArchivePage() {
const singlefileUrl = archive.singlefile_path ? `/media/${encodeURIComponent(archive.singlefile_path)}` : null;
const screenshotUrl = archive.screenshot_path ? `/media/${encodeURIComponent(archive.screenshot_path)}` : null;
const readabilityUrl = archive.readability_path ? `/media/${encodeURIComponent(archive.readability_path)}` : null;
const readabilityUrl = archive.readability_path;
const singlefileButton = <ExternalCardLink to={singlefileUrl}>
<Button content='View' color='blue'/>
</ExternalCardLink>;
const readabilityLink = readabilityUrl ?
<ExternalCardLink to={readabilityUrl}><Button content='Article'/></ExternalCardLink> :
<PreviewLink file={{path: readabilityUrl, mimetype: 'text/html'}}><Button content='Article'/></PreviewLink> :
<Button disabled content='Article'/>;
const screenshot = screenshotUrl ?