From 650ca1649b38587452c8d288c9685ae3c0d4d489 Mon Sep 17 00:00:00 2001 From: Rayane STASZEWSKI Date: Fri, 31 Oct 2025 12:21:42 +0100 Subject: [PATCH 1/2] disable non-essential homepage fetch --- src/components/HomePage/Card/index.tsx | 10 +++++++++- src/components/HomePage/ExploreTopicsSection/index.tsx | 1 + src/components/HomePage/QuickLinks/index.tsx | 1 + src/components/HomePage/QuranInYearSection/index.tsx | 8 +++++++- .../HomePage/ReadingSection/ChapterCard/index.tsx | 10 ++++++++-- .../HomePage/ReadingSection/NewCard/index.tsx | 2 ++ .../ReadingSection/NoGoalOrStreakCard/index.tsx | 1 + .../HomePage/ReadingSection/StreakOrGoalCard/index.tsx | 1 + src/components/HomePage/ReadingSection/index.tsx | 1 + 9 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/components/HomePage/Card/index.tsx b/src/components/HomePage/Card/index.tsx index 35a38f3a9a..d4ee026cfa 100644 --- a/src/components/HomePage/Card/index.tsx +++ b/src/components/HomePage/Card/index.tsx @@ -13,6 +13,7 @@ interface CardProps { className?: string; linkClassName?: string; onClick?: () => void; + shouldPrefetch?: boolean; } const Card: React.FC = ({ @@ -22,10 +23,17 @@ const Card: React.FC = ({ className, linkClassName, onClick, + shouldPrefetch = false, }) => { if (link) { return ( - +
{children}
); diff --git a/src/components/HomePage/ExploreTopicsSection/index.tsx b/src/components/HomePage/ExploreTopicsSection/index.tsx index 9dda8275ba..6b8379ad44 100644 --- a/src/components/HomePage/ExploreTopicsSection/index.tsx +++ b/src/components/HomePage/ExploreTopicsSection/index.tsx @@ -63,6 +63,7 @@ const ExploreTopicsSection = () => { className={classNames(styles.topic, { [styles.highlighted]: topic.isHighlighted, })} + shouldPrefetch={false} >
{t(topic.key)} diff --git a/src/components/HomePage/QuickLinks/index.tsx b/src/components/HomePage/QuickLinks/index.tsx index a1c08edd20..66580cea03 100644 --- a/src/components/HomePage/QuickLinks/index.tsx +++ b/src/components/HomePage/QuickLinks/index.tsx @@ -83,6 +83,7 @@ const QuickLinks: React.FC = () => { logButtonClick(`quick_link_${quickLink.slug}`); }} className={styles.quickLink} + shouldPrefetch={false} >
{text} diff --git a/src/components/HomePage/QuranInYearSection/index.tsx b/src/components/HomePage/QuranInYearSection/index.tsx index 809c36447c..1847e82975 100644 --- a/src/components/HomePage/QuranInYearSection/index.tsx +++ b/src/components/HomePage/QuranInYearSection/index.tsx @@ -41,7 +41,12 @@ const QuranInYearSection = () => {
- +

{t('calendar-cta')}

@@ -66,6 +71,7 @@ const QuranInYearSection = () => { onClick={() => { logButtonClick('quran_in_year_calendar'); }} + shouldPrefetch={false} > {t('quran-in-year-cta')} = ({ const link = getChapterWithStartingVerseUrl(`${surahNumber}:${verseNumber}`); return ( - +
{surahNumberString.padStart(3, '0')} @@ -59,7 +59,12 @@ const ChapterCard: React.FC = ({
{isContinueReading ? ( - +
{t('common:verse')} {toLocalizedNumber(verseNumber, lang)} @@ -77,6 +82,7 @@ const ChapterCard: React.FC = ({ href={link} onClick={onBeginClicked} className={styles.beginButton} + shouldPrefetch={false} > {t('begin')} diff --git a/src/components/HomePage/ReadingSection/NewCard/index.tsx b/src/components/HomePage/ReadingSection/NewCard/index.tsx index d8b0a6bddd..fbf72ba39f 100644 --- a/src/components/HomePage/ReadingSection/NewCard/index.tsx +++ b/src/components/HomePage/ReadingSection/NewCard/index.tsx @@ -37,6 +37,7 @@ const NewCard: React.FC = () => { className={styles.firstTimeReadingCard} link={getTakeNotesNavigationUrl()} isNewTab + shouldPrefetch={false} >
@@ -55,6 +56,7 @@ const NewCard: React.FC = () => { className={styles.linkHref} onClick={onTakeNotesClicked} isNewTab + shouldPrefetch={false} /> ), }} diff --git a/src/components/HomePage/ReadingSection/NoGoalOrStreakCard/index.tsx b/src/components/HomePage/ReadingSection/NoGoalOrStreakCard/index.tsx index 7cc0445718..cdc69a6cf5 100644 --- a/src/components/HomePage/ReadingSection/NoGoalOrStreakCard/index.tsx +++ b/src/components/HomePage/ReadingSection/NoGoalOrStreakCard/index.tsx @@ -20,6 +20,7 @@ const NoGoalOrStreakCard = () => { ? getReadingGoalNavigationUrl() : getLoginNavigationUrl(getReadingGoalNavigationUrl()) } + shouldPrefetch={false} >
diff --git a/src/components/HomePage/ReadingSection/StreakOrGoalCard/index.tsx b/src/components/HomePage/ReadingSection/StreakOrGoalCard/index.tsx index 1a304e9bc0..4cbba3e7a2 100644 --- a/src/components/HomePage/ReadingSection/StreakOrGoalCard/index.tsx +++ b/src/components/HomePage/ReadingSection/StreakOrGoalCard/index.tsx @@ -51,6 +51,7 @@ const StreakOrGoalCard: React.FC = ({ goal, streak, currentActivityDay }) className={cardStyles.streakCard} link={goal ? getReadingGoalProgressNavigationUrl() : getReadingGoalNavigationUrl()} onClick={goal ? onGoalArrowClicked : onStreakCardClicked} + shouldPrefetch={false} >
diff --git a/src/components/HomePage/ReadingSection/index.tsx b/src/components/HomePage/ReadingSection/index.tsx index c247b27ed3..a2ded435cb 100644 --- a/src/components/HomePage/ReadingSection/index.tsx +++ b/src/components/HomePage/ReadingSection/index.tsx @@ -55,6 +55,7 @@ const ReadingSection: React.FC = () => { variant={LinkVariant.Blend} href={getProfileNavigationUrl()} onClick={onMyQuranClicked} + shouldPrefetch={false} >

{t('my-quran')}

From 4825e1659dd896180a84b26af8006af5c38b12df Mon Sep 17 00:00:00 2001 From: Rayane STASZEWSKI Date: Sun, 2 Nov 2025 10:39:16 +0100 Subject: [PATCH 2/2] applied coderabbit suggestion --- src/components/HomePage/ReadingSection/NewCard/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/HomePage/ReadingSection/NewCard/index.tsx b/src/components/HomePage/ReadingSection/NewCard/index.tsx index fbf72ba39f..c49ac4d767 100644 --- a/src/components/HomePage/ReadingSection/NewCard/index.tsx +++ b/src/components/HomePage/ReadingSection/NewCard/index.tsx @@ -37,7 +37,6 @@ const NewCard: React.FC = () => { className={styles.firstTimeReadingCard} link={getTakeNotesNavigationUrl()} isNewTab - shouldPrefetch={false} >