File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
- import { FC , useRef } from 'react' ;
1
+ import { FC , useRef , useState } from 'react' ;
2
2
3
3
import ChevronIcon from '@/icons/ChevronIcon' ;
4
4
import useAccordionAnimation from '@/shared/useAccordionAnimation' ;
@@ -26,6 +26,15 @@ const TransferBank: FC<TransferBankProps> = ({ transferCredits }) => {
26
26
onClick = { toggle }
27
27
/>
28
28
</ article >
29
+ < div className = "mt-2 flex" >
30
+ < div className = "flex items-center gap-x-3 rounded-full bg-primary-100 px-2 py-1" >
31
+ < span className = "whitespace-nowrap text-[11px] font-medium text-primary-500 lg:text-sm" >
32
+ { /*Assumes the second digit in the second word in each course code is the number of credits it provides*/ }
33
+ { transferCredits . reduce ( ( acc , curr ) => acc + parseInt ( curr . split ( ' ' ) [ 1 ] [ 1 ] ) , 0 ) } { ' ' }
34
+ Credits Taken
35
+ </ span >
36
+ </ div >
37
+ </ div >
29
38
< ol
30
39
className = { `mt-4 flex flex-wrap gap-x-10 gap-y-3 transition-all duration-1000 ease-in-out` }
31
40
>
You can’t perform that action at this time.
0 commit comments