Created
July 20, 2020 01:03
-
-
Save lseemann/87244f747a3a9266028a65f1fdafac55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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