fixed error due to issue with server sided preview generation (#70)
This commit is contained in:
@@ -23,7 +23,15 @@ export function PreviewUri(props: PreviewUriProps) {
|
||||
<div>
|
||||
{previewFetcher.type === "done" ? (
|
||||
<>
|
||||
{"error" in previewFetcher.data ? (
|
||||
{typeof previewFetcher.data == "string" ? (
|
||||
<PreviewBox>
|
||||
<Body>
|
||||
<span
|
||||
dangerouslySetInnerHTML={{ __html: previewFetcher.data }}
|
||||
></span>
|
||||
</Body>
|
||||
</PreviewBox>
|
||||
) : "error" in previewFetcher.data ? (
|
||||
<PreviewBox>
|
||||
<Body>{previewFetcher.data.error}</Body>
|
||||
</PreviewBox>
|
||||
|
||||
Reference in New Issue
Block a user