From ae8f9ca22200e862b9e7813116a1abb3932e502a Mon Sep 17 00:00:00 2001 From: Rotimi Best Date: Sat, 22 Apr 2023 20:25:28 +0000 Subject: [PATCH] CLASSROOMIO-T-28: Show apps only on individual lessons Co-authored-by: Rotimi Best Merge-request: CLASSROOMIO-MR-5 Merged-by: Digdippa Team --- src/routes/_layout.svelte | 3 ++- src/utils/functions/showAppsSideBar.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/utils/functions/showAppsSideBar.js diff --git a/src/routes/_layout.svelte b/src/routes/_layout.svelte index a57bddae..22e44836 100644 --- a/src/routes/_layout.svelte +++ b/src/routes/_layout.svelte @@ -21,6 +21,7 @@ // import Footer from '../components/Footer/index.svelte'; import Apps from '../components/Apps/index.svelte'; import { handleAuthChange } from '../utils/functions/api'; + import showAppsSideBar from '../utils/functions/showAppsSideBar'; import { user, profile } from '../utils/store/user'; import { getSupabase } from '../utils/functions/supabase'; import { isMobile } from '../utils/store/useMobile'; @@ -210,7 +211,7 @@ {/if} - {#if isCoursePage(path)} + {#if showAppsSideBar(path)} {/if} diff --git a/src/utils/functions/showAppsSideBar.js b/src/utils/functions/showAppsSideBar.js new file mode 100644 index 00000000..16348d1a --- /dev/null +++ b/src/utils/functions/showAppsSideBar.js @@ -0,0 +1,5 @@ +function showAppsSideBar(path) { + return path.includes('/lessons/') && !path.includes('landingpage'); +} + +export default showAppsSideBar;