@@ -8,6 +8,7 @@ import useCourse from '../../../hooks/useCourse'
8
8
import { PUBLIC_URL } from '../../../../config'
9
9
10
10
export const ChatInfo = ( { course } : { course : Course } ) => {
11
+
11
12
const { user } = useCurrentUser ( )
12
13
const { data : chatInstance } = useCourse ( course . courseId )
13
14
const { t, i18n } = useTranslation ( )
@@ -16,19 +17,21 @@ export const ChatInfo = ({ course }: { course: Course }) => {
16
17
if ( ! chatInstance || ! user ) return null
17
18
18
19
const amongResponsibles = chatInstance . responsibilities ? chatInstance . responsibilities . some ( ( r ) => r . user . id === user . id ) : false
20
+
19
21
return (
20
- < Box mb = { 3 } >
21
- < Typography variant = "body2 " fontStyle = "italic" >
22
+ < Box mt = { 2 } mb = { 4 } >
23
+ < Typography variant = "body1 " fontStyle = "italic" >
22
24
{ course . courseUnits . map ( ( unit ) => unit . code ) . join ( ', ' ) }
23
25
</ Typography >
24
26
< Typography variant = "h5" sx = { { fontWeight : 'bold' , mb : 1 , display : 'flex' , alignItems : 'center' , justifyContent : 'space-between' } } >
25
27
{ course ?. name [ language ] || 'undefined course' }
26
- { ( user . isAdmin && amongResponsibles ) && ( < Link href = { `${ PUBLIC_URL } /courses/${ course . courseId } ` } >
27
- < Typography variant = "body2" > { t ( 'course:settings' ) } </ Typography >
28
- </ Link > )
29
- }
30
28
</ Typography >
31
- < Typography variant = "body2" > { formatDate ( course . activityPeriod ) } </ Typography >
29
+ < Typography variant = "body1" > { formatDate ( course . activityPeriod ) } </ Typography >
30
+ { ( user . isAdmin && amongResponsibles ) &&
31
+ ( < Link href = { `${ PUBLIC_URL } /courses/${ course . courseId } ` } >
32
+ < Typography > { t ( 'course:settings' ) } </ Typography >
33
+ </ Link > )
34
+ }
32
35
</ Box >
33
36
)
34
37
}
0 commit comments