From 3bca8327203d0f5d8e5692b8f5272a961744759f Mon Sep 17 00:00:00 2001 From: Timur Ercan Date: Tue, 14 Feb 2023 11:17:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/pages/documents/[id]/index.tsx | 26 ++++++++++++------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/apps/web/pages/documents/[id]/index.tsx b/apps/web/pages/documents/[id]/index.tsx index 08c05acfa..eaab64c24 100644 --- a/apps/web/pages/documents/[id]/index.tsx +++ b/apps/web/pages/documents/[id]/index.tsx @@ -120,22 +120,20 @@ export async function getServerSideProps(context: any) { context.req, context.res ); + + // todo optimize querys + // todo no intersection groups + + return { + props: { + document: document, + }, + }; } catch (error) { - if (!document) { - return { - notFound: true, - }; - } + return { + notFound: true, + }; } - - // todo optimize querys - // todo no intersection groups - - return { - props: { - document: document, - }, - }; } DocumentsDetailPage.getLayout = function getLayout(page: ReactElement) {