@@ -19,7 +19,8 @@ import {
19
19
useRedux ,
20
20
useTypedRedux ,
21
21
} from "@cocalc/frontend/app-framework" ;
22
- import { Loading , ActivityDisplay , ErrorDisplay } from "../../components" ;
22
+ import { Loading , ActivityDisplay } from "../../components" ;
23
+ import ShowError from "@cocalc/frontend/components/error" ;
23
24
import {
24
25
AssignmentsMap ,
25
26
CourseSettingsRecord ,
@@ -73,20 +74,20 @@ const CoursePanelWrapper: React.FC<FrameProps> = React.memo(
73
74
const students : StudentsMap | undefined = useRedux ( name , "students" ) ;
74
75
const assignments : AssignmentsMap | undefined = useRedux (
75
76
name ,
76
- "assignments"
77
+ "assignments" ,
77
78
) ;
78
79
const handouts : HandoutsMap | undefined = useRedux ( name , "handouts" ) ;
79
80
const settings : CourseSettingsRecord | undefined = useRedux (
80
81
name ,
81
- "settings"
82
+ "settings" ,
82
83
) ;
83
84
const configuring_projects : boolean | undefined = useRedux (
84
85
name ,
85
- "configuring_projects"
86
+ "configuring_projects" ,
86
87
) ;
87
88
const reinviting_students : boolean | undefined = useRedux (
88
89
name ,
89
- "reinviting_students"
90
+ "reinviting_students" ,
90
91
) ;
91
92
const activity : Map < string , any > | undefined = useRedux ( name , "activity" ) ;
92
93
const error : string | undefined = useRedux ( name , "error" ) ;
@@ -188,12 +189,11 @@ const CoursePanelWrapper: React.FC<FrameProps> = React.memo(
188
189
}
189
190
190
191
function render_error ( ) : Rendered {
191
- if ( ! error ) return ;
192
192
return (
193
- < ErrorDisplay
194
- banner = { true }
193
+ < ShowError
194
+ style = { { margin : "15px" } }
195
195
error = { error }
196
- onClose = { ( ) => {
196
+ setError = { ( error ) => {
197
197
const actions = redux . getActions ( name ) as CourseActions ;
198
198
if ( actions != null ) actions . set_error ( "" ) ;
199
199
} }
@@ -213,7 +213,7 @@ const CoursePanelWrapper: React.FC<FrameProps> = React.memo(
213
213
{ render_panel ( ) }
214
214
</ div >
215
215
) ;
216
- }
216
+ } ,
217
217
) ;
218
218
219
219
export function wrap ( Panel ) {
0 commit comments