mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 17:03:34 +08:00
17 lines
435 B
JavaScript
17 lines
435 B
JavaScript
import React from 'react';
|
|
|
|
import t from 'coral-framework/services/i18n';
|
|
import RestrictedMessageBox from './RestrictedMessageBox';
|
|
|
|
export default ({children, restricted, message = t('framework.content_not_available'), restrictedComp}) => {
|
|
if (restricted) {
|
|
return restrictedComp ? restrictedComp : <RestrictedMessageBox message={message} />;
|
|
} else {
|
|
return (
|
|
<div>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|
|
};
|