diff --git a/app/src/frontend/components/info-box.tsx b/app/src/frontend/components/info-box.tsx index 0a9e3892..f6e4f5c3 100644 --- a/app/src/frontend/components/info-box.tsx +++ b/app/src/frontend/components/info-box.tsx @@ -1,27 +1,19 @@ -import React, { Fragment } from 'react'; +import React from 'react'; interface InfoBoxProps { - msg: string; + msg?: string; } const InfoBox: React.FC = (props) => ( - + <> { - (props.msg || props.children)? - ( -
- { - typeof props.msg === 'string' ? - props.msg - : 'Enjoy the colouring! Usual service should resume shortly.' - } - { - props.children - } -
- ) : null + (props.msg || props.children) && +
+ { props.msg ?? '' } + { props.children } +
} -
+ ); export default InfoBox;