From de2f614251b6214da2a71d49e26d0a002a4ffb0d Mon Sep 17 00:00:00 2001 From: SOUMITRA SAHA Date: Sun, 19 May 2024 22:25:26 +0530 Subject: [PATCH] Fixed: Disable Login Requirement on `LessonView` --- apps/web/components/LessonView.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/web/components/LessonView.tsx b/apps/web/components/LessonView.tsx index ace8a0ea..41df456b 100644 --- a/apps/web/components/LessonView.tsx +++ b/apps/web/components/LessonView.tsx @@ -51,14 +51,18 @@ export const LessonView = async ({ isPdfRequested?: Boolean; }) => { const session = await getServerSession(authOptions); - const problemIndex = track.problems.findIndex((p) => p.id === problem.id); - if (problemIndex > 1 && (!session || !session.user)) { - return
- - -
; + // eslint-disable-next-line turbo/no-undeclared-env-vars + const isInDevMode = process?.env?.NODE_ENV === "development"; + + if (!isInDevMode && problemIndex > 1 && (!session || !session.user)) { + return ( +
+ + +
+ ); } if (problem.type === "MCQ") {