import React from 'react'
import PropTypes from 'prop-types'
import FakeCourse from './fake-course'

export default function MissingCourse(props) {
	return (
		<FakeCourse
			title={`Cannot load course ${props.clbid}`}
			details={String(props.error)}
			className={`missing ${props.className}`}
		/>
	)
}

MissingCourse.propTypes = {
	className: PropTypes.string,
	clbid: PropTypes.number.isRequired,
	error: PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Error)])
		.isRequired,
}

@@ -1,12 +1,22 @@
+// @flow%0A%0A
 import React
@@ -33,43 +33,8 @@
 ct'%0A
-import PropTypes from 'prop-types'%0A
 impo
@@ -69,16 +69,98 @@
 ourse'%0A%0A
+type Props = %7B%0A%09+className?: string,%0A%09+clbid: string,%0A%09+error: string %7C Error,%0A%7D%0A%0A
 export d
@@ -194,16 +194,23 @@
 se(props
+: Props
 ) %7B%0A%09ret
@@ -349,16 +349,22 @@
 lassName
+ %7C%7C ''
 %7D%60%7D%0A%09%09/%3E
@@ -373,194 +373,4 @@
 )%0A%7D%0A
-%0AMissingCourse.propTypes = %7B%0A%09className: PropTypes.string,%0A%09clbid: PropTypes.number.isRequired,%0A%09error: PropTypes.oneOfType(%5BPropTypes.string, PropTypes.instanceOf(Error)%5D)%0A%09%09.isRequired,%0A%7D%0A

convert MissingCourse to flow