Skip to content

Commit 6142f7c

Browse files
committed
Point homepage cards to subject pages
1 parent 52300ce commit 6142f7c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/app/components/elements/list-groups/ListView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export interface ListViewCardProps extends ListGroupItemProps {
1515
icon: TitleIconProps;
1616
subject?: Subject;
1717
linkTags?: ListViewTagProps[];
18+
url?: string;
1819
}
1920

2021
export const ListViewCard = ({item, icon, subject, linkTags, ...rest}: ListViewCardProps) => {

src/app/components/site/phy/HomepagePhy.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ const getListViewSubjectCard = (sc: subjectCategory) => {
124124
item: item,
125125
icon: {type: "img", icon: `/assets/phy/icons/redesign/subject-${sc.subject}.svg`},
126126
subject: sc.subject as Subject,
127-
linkTags: sc.subcategories.map((subcat) => ({tag: subcat.humanStage, url: subcat.href}))
127+
linkTags: sc.subcategories.map((subcat) => ({tag: subcat.humanStage, url: subcat.href})),
128+
url: `/${sc.subject}`,
128129
};
129130

130131
return listViewSubjectCard;

0 commit comments

Comments
 (0)