Skip to content

Commit

Permalink
Merge pull request #2151 from quran/revert-2144-add-post-ramadan-lear…
Browse files Browse the repository at this point in the history
…ning-plans

Revert "Add post-Ramadan learning plan button"
  • Loading branch information
osamasayed authored May 7, 2024
2 parents 78e6c86 + 0e24c0a commit 7a22db1
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 28 deletions.
5 changes: 4 additions & 1 deletion src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux';

import styles from './Banner.module.scss';

// import MoonIllustrationSVG from '@/public/images/moon-illustration.svg';
import MoonIllustrationSVG from '@/public/images/moon-illustration.svg';
import { selectIsBannerVisible } from '@/redux/slices/banner';

type BannerProps = {
Expand All @@ -21,6 +21,9 @@ const Banner = ({ text, ctaButton }: BannerProps) => {
})}
>
<div className={styles.description}>
<div className={styles.illustrationContainer}>
<MoonIllustrationSVG />
</div>
<div className={styles.text}>{text}</div>
</div>
{ctaButton && <div className={styles.ctaContainer}>{ctaButton}</div>}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Course/Buttons/NavbarButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Button, { ButtonSize, ButtonType } from '@/dls/Button/Button';
import { logButtonClick } from '@/utils/eventLogger';
import { getCourseNavigationUrl } from '@/utils/navigation';

const LEARNING_PLAN_SLUG = 'avoiding-the-post-ramadan-slump';
const LEARNING_PLAN_SLUG = 'preparing-our-hearts-for-ramadan';

const NavbarButton = () => {
const { t } = useTranslation('common');
Expand Down
5 changes: 0 additions & 5 deletions src/components/Navbar/Navbar.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,4 @@
.hiddenNav {
// https://ptgamr.github.io/2014-09-13-translate3d-vs-translate-performance/
transform: translate3d(0, calc(-1 * var(--navbar-container-height)), 0);

// TODO: remove this when banner is removed
@include breakpoints.smallerThanTablet {
transform: translate3d(0, calc(-1 * (var(--navbar-container-height) + var(--banner-height))), 0);
}
}
5 changes: 0 additions & 5 deletions src/components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import React from 'react';

import classNames from 'classnames';
import useTranslation from 'next-translate/useTranslation';
import { useSelector, shallowEqual } from 'react-redux';

import styles from './Navbar.module.scss';
import NavbarBody from './NavbarBody';

import Banner from '@/components/Banner/Banner';
import LearningPlanButton from '@/components/Course/Buttons/NavbarButton';
import { useOnboarding } from '@/components/Onboarding/OnboardingProvider';
import { selectNavbar } from '@/redux/slices/navbar';

const Navbar = () => {
const { t } = useTranslation('common');
const { isActive } = useOnboarding();
const { isVisible: isNavbarVisible } = useSelector(selectNavbar, shallowEqual);
const showNavbar = isNavbarVisible || isActive;
Expand All @@ -22,7 +18,6 @@ const Navbar = () => {
<>
<div className={styles.emptySpacePlaceholder} />
<nav className={classNames(styles.container, { [styles.hiddenNav]: !showNavbar })}>
<Banner text={t('prepare-hearts.title')} ctaButton={<LearningPlanButton />} />
<NavbarBody />
</nav>
</>
Expand Down
4 changes: 0 additions & 4 deletions src/components/PageContainer/PageContainer.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
margin-inline-start: auto;
margin-inline-end: auto;

@include breakpoints.smallerThanTablet {
margin-block-start: var(--spacing-mega);
}

--flow-side-spacing: var(--spacing-small);
padding-inline-start: var(--flow-side-spacing);
padding-inline-end: var(--flow-side-spacing);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@

.spaceOnTop {
padding-block-start: calc(3.5 * var(--spacing-mega));
@include breakpoints.smallerThanTablet {
padding-block-start: calc(4.5 * var(--spacing-mega));
}
@include breakpoints.tablet {
padding-block-start: calc(3.5 * var(--spacing-mega));
}
}

.chapterNumber {
Expand Down
6 changes: 0 additions & 6 deletions src/pages/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@
$list-max-width: 80rem;

.pageContainer {
@include breakpoints.smallerThanTablet {
padding-block-start: var(--banner-height);
}
@include breakpoints.tablet {
padding-block-start: var(--spacing-small);
}
padding-block-end: var(--spacing-small);
padding-inline-start: 0;
padding-inline-end: 0;
Expand Down

0 comments on commit 7a22db1

Please sign in to comment.