From 05e754e49066605847e7608471c0e44868dfb7e0 Mon Sep 17 00:00:00 2001 From: L Martins Date: Tue, 31 Oct 2023 19:19:51 -0300 Subject: [PATCH 1/3] feature: Turning repeated URLs and target attribute into constants --- website/components/menubar.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/website/components/menubar.js b/website/components/menubar.js index fbbe614b..4c10a2ed 100644 --- a/website/components/menubar.js +++ b/website/components/menubar.js @@ -22,6 +22,10 @@ const MenuBar = props => { const [showMenuDropdown, setShowMenuDropdown] = useState(false); const documentationMenu = useRef(null); const [closeMenu, setCloseMenu] = useState(true); + + const megadraftUrl = 'https://draftjs.slack.com/messages/megadraft/'; + const githubUrl = 'https://github.com/globocom/megadraft'; + const targetBlank = '_blank'; const handleTouchTap = event => { // This prevents ghost click. @@ -74,14 +78,14 @@ const MenuBar = props => { @@ -122,15 +126,15 @@ const MenuBar = props => { - - @@ -152,6 +145,8 @@ const MenuBar = props => { const MenuDropDown = props => { const { documentationMenu, handleRequestClose, showMenuDropdown } = props; + const targetBlank = "_blank"; + return (