Skip to content

Commit

Permalink
fix build issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jackiequach committed Jul 11, 2024
1 parent 3ae14e1 commit 0f5a463
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/components/ReaderLayout/ReaderLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ const ReaderLayout: React.FC<{
const isEmbed = MediaTypes.embed.includes(link.media_type);
const isRead = MediaTypes.read.includes(link.media_type);

if (!isEmbed && !isRead) {
return NotFound404();
}

const pdfWorkerSrc = `${origin}/pdf-worker/pdf.worker.min.js`;

/**
Expand Down Expand Up @@ -153,6 +149,10 @@ const ReaderLayout: React.FC<{
);
};

if (!isEmbed && !isRead) {
return NotFound404();
}

return (
<>
{isEmbed && (
Expand Down
5 changes: 4 additions & 1 deletion src/pages/404.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ const NotFound404 = () => {

return (
<Layout>
<TemplateAppContainer breakout={<DrbBreakout />} contentPrimary={contentPrimaryElement} />
<TemplateAppContainer
breakout={<DrbBreakout />}
contentPrimary={contentPrimaryElement}
/>
</Layout>
);
};
Expand Down

0 comments on commit 0f5a463

Please sign in to comment.