feat: render footer correctly (#42096)
Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
This commit is contained in:
@ -26,11 +26,12 @@ export default function layoutSelector({ element, props }) {
|
||||
}
|
||||
|
||||
const splitPath = pathname.split('/').filter(x => x);
|
||||
const isSuperBlock =
|
||||
(splitPath.length === 2 && splitPath[0]) === 'learn' ||
|
||||
(splitPath.length === 3 && splitPath[1]) === 'learn';
|
||||
|
||||
if (/\/learn\//.test(pathname) && !isSuperBlock) {
|
||||
const isChallenge =
|
||||
(splitPath.length === 4 && splitPath[0]) === 'learn' ||
|
||||
(splitPath.length === 5 && splitPath[1]) === 'learn';
|
||||
|
||||
if (isChallenge) {
|
||||
return (
|
||||
<DefaultLayout pathname={pathname} showFooter={false}>
|
||||
{element}
|
||||
|
Reference in New Issue
Block a user