Fixed build
This commit is contained in:
parent
0328e730e1
commit
e4b39a4c38
|
@ -144,7 +144,7 @@ const Revalidate = (req: NextApiRequest, res: NextApiResponse<ResponseMailProps>
|
|||
case "library-item": {
|
||||
paths.push(`/library`);
|
||||
paths.push(`/library/${body.entry.slug}`);
|
||||
paths.push(`/library/${body.entry.slug}/scans`);
|
||||
paths.push(`/library/${body.entry.slug}/reader`);
|
||||
body.entry.subitem_of.forEach((parentItem) => {
|
||||
paths.push(`/library/${parentItem.slug}`);
|
||||
});
|
||||
|
@ -165,7 +165,7 @@ const Revalidate = (req: NextApiRequest, res: NextApiResponse<ResponseMailProps>
|
|||
ranged_content.slug.length - body.entry.slug.length - 1
|
||||
);
|
||||
paths.push(`/library/${parentSlug}`);
|
||||
paths.push(`/library/${parentSlug}/scans`);
|
||||
paths.push(`/library/${parentSlug}/reader`);
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
@ -180,7 +180,7 @@ const Revalidate = (req: NextApiRequest, res: NextApiResponse<ResponseMailProps>
|
|||
case "ranged-content": {
|
||||
if (body.entry.library_item) {
|
||||
paths.push(`/library/${body.entry.library_item.slug}`);
|
||||
paths.push(`/library/${body.entry.library_item.slug}/scans`);
|
||||
paths.push(`/library/${body.entry.library_item.slug}/reader`);
|
||||
}
|
||||
if (body.entry.content) {
|
||||
paths.push(`/contents/${body.entry.content.slug}`);
|
||||
|
|
|
@ -762,6 +762,8 @@ export const getStaticProps: GetStaticProps = async (context) => {
|
|||
|
||||
const pageWidth = item.libraryItems.data[0].attributes.size?.width ?? 120;
|
||||
|
||||
if (pages.length === 0) return { notFound: true };
|
||||
|
||||
const props: Props = {
|
||||
item: item.libraryItems.data[0].attributes,
|
||||
pages,
|
||||
|
|
Loading…
Reference in New Issue