Skip to content

Commit 2c3eeaa

Browse files
committed
Add "coming soon" to university maths revision cards
1 parent 8cd9961 commit 2c3eeaa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/app/components/pages/subjectLandingPageComponents.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,15 @@ const BookCard = (book: BookInfo, description: string) => (context: NonNullable<
9494
const StepIntoPhyCard = BookCard(ISAAC_BOOKS_BY_TAG["phys_book_step_into"], "Discover secondary physics ideas and interesting experiments. Aimed at students in years 7 and 8.");
9595
const StepUpPhyCard = BookCard(ISAAC_BOOKS_BY_TAG["phys_book_step_up"], "Build a strong foundation in physics. Aimed at students in year 9.");
9696

97-
const ArbitraryPageLinkCard = (title: string, subtitle: string, linkTags: ListViewTagProps[]) => (context: NonNullable<Required<PageContextState>>): ListViewCardProps => ({
97+
const ArbitraryPageLinkCard = (title: string, subtitle: string, linkTags: ListViewTagProps[], state?: AbstractListViewItemState) => (context: NonNullable<Required<PageContextState>>): ListViewCardProps => ({
9898
item: {
9999
title,
100100
subtitle
101101
},
102102
icon: {type: "hex", icon: "icon-revision"},
103103
subject: context.subject,
104-
linkTags
104+
linkTags,
105+
state,
105106
});
106107

107108
const AnvilAppsCard = (context: NonNullable<Required<PageContextState>>): ListViewCardProps => {
@@ -133,7 +134,7 @@ const BiologyExtensionQuestionsCard = (context: NonNullable<Required<PageContext
133134
};
134135

135136
const MathsUniCard = (context: NonNullable<Required<PageContextState>>): ListViewCardProps => {
136-
return ArbitraryPageLinkCard(context.subject === "maths" ? "Revision" : `Maths revision for ${context.subject}`, `Refresh your maths skills in preparation for ${context.subject} at university.`, [{tag: "List of revision areas", url: extendUrl(context, "")}])(context);
137+
return ArbitraryPageLinkCard(context.subject === "maths" ? "Revision" : `Maths revision for ${context.subject}`, `Refresh your maths skills in preparation for ${context.subject} at university.`, [{tag: "List of revision areas", url: extendUrl(context, "")}], AbstractListViewItemState.COMING_SOON)(context);
137138
};
138139

139140
const subjectSpecificCardsMap: {[subject in keyof typeof PHY_NAV_SUBJECTS]: {[stage in typeof PHY_NAV_SUBJECTS[subject][number]]: (LandingPageCard | null)[]}} = {

0 commit comments

Comments
 (0)