File tree Expand file tree Collapse file tree 1 file changed +21
-14
lines changed Expand file tree Collapse file tree 1 file changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -83,20 +83,27 @@ export default function ResourcesBySelector({
8383 < div
8484 className = { `grid ${ columns === 2 ? "grid-cols-2" : "grid-cols-3" } gap-4` }
8585 >
86- { visibleResources . map ( ( page ) => (
87- < a
88- key = { page . id }
89- href = { `/${ page . id } /` }
90- className = "flex flex-col gap-2 rounded-sm border border-solid border-gray-200 p-6 text-black no-underline hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800"
91- >
92- < p className = "decoration-accent underline decoration-2 underline-offset-4" >
93- { page . data . title }
94- </ p >
95- < span className = "line-clamp-3" title = { page . data . description } >
96- { page . data . description }
97- </ span >
98- </ a >
99- ) ) }
86+ { visibleResources . map ( ( page ) => {
87+ const href =
88+ page . collection === "stream"
89+ ? `/videos/${ page . data . url } /`
90+ : `/${ page . id } /` ;
91+
92+ return (
93+ < a
94+ key = { page . id }
95+ href = { href }
96+ className = "flex flex-col gap-2 rounded-sm border border-solid border-gray-200 p-6 text-black no-underline hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800"
97+ >
98+ < p className = "decoration-accent underline decoration-2 underline-offset-4" >
99+ { page . data . title }
100+ </ p >
101+ < span className = "line-clamp-3" title = { page . data . description } >
102+ { page . data . description }
103+ </ span >
104+ </ a >
105+ ) ;
106+ } ) }
100107 </ div >
101108 </ div >
102109 ) ;
You can’t perform that action at this time.
0 commit comments