Skip to content

Instantly share code, notes, and snippets.

@lseemann
Created July 20, 2020 01:03
Show Gist options
  • Save lseemann/87244f747a3a9266028a65f1fdafac55 to your computer and use it in GitHub Desktop.
Save lseemann/87244f747a3a9266028a65f1fdafac55 to your computer and use it in GitHub Desktop.
const EditorAlert = ({ block, children }) => {
const { isStaff } = useContext(AuthContext);
if (!isStaff) {
return null;
}
if (block) {
return <div className="editor-alert">{children}</div>;
}
return <span className="editor-alert">{children}</span>;
};
export default EditorAlert;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment