From eb51a749bb16aaee2688d842d29539565411d62a Mon Sep 17 00:00:00 2001 From: Yangshun Date: Mon, 14 Feb 2022 09:21:18 +0800 Subject: [PATCH] website: change sidebar contents --- website/src/components/SidebarAd/index.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/website/src/components/SidebarAd/index.js b/website/src/components/SidebarAd/index.js index 29475668..762d31d9 100644 --- a/website/src/components/SidebarAd/index.js +++ b/website/src/components/SidebarAd/index.js @@ -150,23 +150,18 @@ export default React.memo(function SidebarAd() { {() => { const path = window.location.pathname; // Ugly hack to show conditional sidebar content. - if (path.startsWith('/resume')) { - return ; - } - if ( - path.includes('negotiation') || - path.startsWith('/understanding-compensation') - ) { + if (path.includes('negotiation') || path.includes('compensation')) { return ; } if ( + path.includes('resume') || path.includes('coding') || - path.startsWith('/best-practice-questions') || - path.startsWith('/cheatsheet') || - path.startsWith('/mock-interviews') || - path.startsWith('/algorithms') + path.includes('best-practice-questions') || + path.includes('cheatsheet') || + path.includes('mock-interviews') || + path.includes('algorithms') ) { return Math.random() > 0.5 ? (