From ac5c61f9308c6a4fb265f4958e531a649f93be92 Mon Sep 17 00:00:00 2001 From: plondon Date: Wed, 16 Aug 2023 12:23:59 -0400 Subject: [PATCH] Demo --- client/pages/index.tsx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/client/pages/index.tsx b/client/pages/index.tsx index 85dc0b1..0f193ea 100644 --- a/client/pages/index.tsx +++ b/client/pages/index.tsx @@ -74,9 +74,9 @@ const Home = (props: Props) => {
- {/*
+
{props.lessons - .filter((lesson) => lesson.slug !== 'hello-codeamigo') + .filter((lesson) => lesson.slug === 'hello-codeamigo') .map((lesson) => { return (
{
); })} -
*/} +
{props.lessons .filter((lesson) => lesson.slug !== 'hello-codeamigo') .sort((a, _b) => (a.slug === 'intro-to-python' ? -1 : 1)) .map((lesson) => { const isWhitelisted = - (meData?.me?.email && - INTRO_TO_JS_WHITELIST.includes(meData?.me?.email) && - lesson.slug === 'intro-to-js') || - lesson.slug === 'intro-to-python'; + meData?.me?.email && + INTRO_TO_JS_WHITELIST.includes(meData?.me?.email) && + lesson.slug === 'intro-to-js'; return (
{
{lesson.title}
- {isWhitelisted || lesson.slug === 'intro-to-python' ? ( + {isWhitelisted ? ( <> Enroll