File tree Expand file tree Collapse file tree 15 files changed +78
-105
lines changed
pages/AssessmentMonitoring
submissions/components/tables
submission/components/answers/ForumPostResponse
discussion/topics/components/lists
enrol-requests/pages/UserRequests
forum/pages/ForumTopicShow Expand file tree Collapse file tree 15 files changed +78
-105
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import { WatchGroup } from 'types/channels/liveMonitoring';
44import { MonitoringRequestData } from 'types/course/assessment/monitoring' ;
55
66import BetaChip from 'lib/components/core/BetaChip' ;
7- import ErrorCard from 'lib/components/core/ErrorCard' ;
87import Page from 'lib/components/core/layouts/Page' ;
8+ import Note from 'lib/components/core/Note' ;
99import useTranslation from 'lib/hooks/useTranslation' ;
1010
1111import translations from '../../translations' ;
@@ -54,8 +54,9 @@ const PulseGrid = (props: PulseGridProps): JSX.Element => {
5454
5555 if ( rejected )
5656 return (
57- < ErrorCard
57+ < Note
5858 message = { t ( translations . cannotConnectToLiveMonitoringChannel ) }
59+ severity = "error"
5960 />
6061 ) ;
6162
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { Typography } from '@mui/material';
44import PropTypes from 'prop-types' ;
55
66import { questionShape } from 'course/assessment/submission/propTypes' ;
7- import Error from 'lib/components/core/ErrorCard ' ;
7+ import Error from 'lib/components/core/Note ' ;
88import FormRichTextField from 'lib/components/form/fields/RichTextField' ;
99import toast from 'lib/hooks/toast' ;
1010
Original file line number Diff line number Diff line change @@ -117,9 +117,7 @@ const SubmissionsTable: FC<Props> = (props) => {
117117
118118 if ( submissions . length === 0 )
119119 return (
120- < Page . PaddedSection >
121- < Note message = { intl . formatMessage ( translations . noSubmissionsMessage ) } />
122- </ Page . PaddedSection >
120+ < Note message = { intl . formatMessage ( translations . noSubmissionsMessage ) } />
123121 ) ;
124122
125123 return (
Original file line number Diff line number Diff line change @@ -45,11 +45,7 @@ const TopicList: FC<TopicListProps> = (props) => {
4545 }
4646
4747 if ( topicList . length === 0 ) {
48- return (
49- < Grid item style = { { position : 'relative' , width : '100%' } } xs >
50- < Note message = { t ( translations . noTopic ) } />
51- </ Grid >
52- ) ;
48+ return < Note message = { t ( translations . noTopic ) } /> ;
5349 }
5450
5551 return (
Original file line number Diff line number Diff line change @@ -82,9 +82,7 @@ const UserRequests: FC<Props> = (props) => {
8282 rejectedEnrolRequests . length === 0
8383 ) {
8484 return (
85- < Page . PaddedSection >
86- < Note message = { intl . formatMessage ( translations . noEnrolRequests ) } />
87- </ Page . PaddedSection >
85+ < Note message = { intl . formatMessage ( translations . noEnrolRequests ) } />
8886 ) ;
8987 }
9088 return undefined ;
Original file line number Diff line number Diff line change @@ -126,8 +126,8 @@ const ForumTopicShow: FC = () => {
126126 < Box className = "my-3 space-y-6" >
127127 { topicNote && (
128128 < Note
129- color = { forumTopic . isResolved ? 'success' : undefined }
130129 message = { topicNote }
130+ severity = { forumTopic . isResolved ? 'success' : 'warning' }
131131 />
132132 ) }
133133 < TopicPostTrees level = { 0 } postIdsArray = { forumTopic . postTreeIds } />
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { connect } from 'react-redux';
44import { useParams } from 'react-router-dom' ;
55import PropTypes from 'prop-types' ;
66
7- import ErrorCard from 'lib/components/core/ErrorCard' ;
87import LoadingIndicator from 'lib/components/core/LoadingIndicator' ;
98import Note from 'lib/components/core/Note' ;
109
@@ -72,8 +71,9 @@ const Category = ({
7271 }
7372 if ( hasFetchError ) {
7473 return (
75- < ErrorCard
74+ < Note
7675 message = { < FormattedMessage { ...translations . fetchFailure } /> }
76+ severity = "error"
7777 />
7878 ) ;
7979 }
Original file line number Diff line number Diff line change 11import { useEffect , useState } from 'react' ;
22
3- import ErrorCard from 'lib/components/core/ErrorCard' ;
43import LoadingIndicator from 'lib/components/core/LoadingIndicator' ;
4+ import Note from 'lib/components/core/Note' ;
55import { DataHandle } from 'lib/hooks/router/dynamicNest' ;
66import { useAppDispatch } from 'lib/hooks/store' ;
77import useTranslation from 'lib/hooks/useTranslation' ;
@@ -39,7 +39,7 @@ const UserEmailSubscriptions = (): JSX.Element => {
3939 if ( status === 'loading' ) return < LoadingIndicator /> ;
4040
4141 if ( status === 'error' )
42- return < ErrorCard message = { t ( translations . fetchFailure ) } /> ;
42+ return < Note message = { t ( translations . fetchFailure ) } severity = "error" /> ;
4343
4444 return < UserEmailSubscriptionsTable /> ;
4545} ;
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments