@@ -25,6 +25,7 @@ import { IconContext } from "react-icons";
2525import ButtonLikeAnchor from "./shared/ButtonLikeAnchor" ;
2626import { ModalHandle } from "./shared/modals/Modal" ;
2727import { broadcastLogout } from "../utils/broadcastSync" ;
28+ import BaseButton from "./shared/BaseButton" ;
2829
2930// References for detecting a click outside of the container of the dropdown menus
3031const containerLang = React . createRef < HTMLDivElement > ( ) ;
@@ -144,11 +145,11 @@ const Header = () => {
144145 { /* Select language */ }
145146 < div className = "nav-dd lang-dd" id = "lang-dd" ref = { containerLang } >
146147 < Tooltip active = { ! displayMenuLang } title = { t ( "LANGUAGE" ) } >
147- < button className = "lang" onClick = { ( ) => setMenuLang ( ! displayMenuLang ) } >
148+ < BaseButton className = "lang" onClick = { ( ) => setMenuLang ( ! displayMenuLang ) } >
148149 < IconContext . Provider value = { { style : { fontSize : "20px" } } } >
149150 < HiTranslate />
150151 </ IconContext . Provider >
151- </ button >
152+ </ BaseButton >
152153 </ Tooltip >
153154 { displayMenuLang && < MenuLang handleChangeLanguage = { handleChangeLanguage } /> }
154155 </ div >
@@ -192,14 +193,14 @@ const Header = () => {
192193 ref = { containerNotify }
193194 >
194195 < Tooltip active = { ! displayMenuNotify } title = { t ( "SYSTEM_NOTIFICATIONS" ) } >
195- < button onClick = { ( ) => setMenuNotify ( ! displayMenuNotify ) } >
196+ < BaseButton onClick = { ( ) => setMenuNotify ( ! displayMenuNotify ) } >
196197 < i className = "fa fa-bell" aria-hidden = "true" />
197198 { errorCounter !== 0 && (
198199 < span id = "error-count" className = "badge" >
199200 { errorCounter }
200201 </ span >
201202 ) }
202- </ button >
203+ </ BaseButton >
203204 </ Tooltip >
204205 { /* Click on the bell icon, a dropdown menu with all services in serviceList and their status opens */ }
205206 { displayMenuNotify && (
@@ -227,11 +228,11 @@ const Header = () => {
227228 ref = { containerHelp }
228229 >
229230 < Tooltip active = { ! displayMenuHelp } title = { t ( "HELP.HELP" ) } >
230- < button
231+ < BaseButton
231232 onClick = { ( ) => setMenuHelp ( ! displayMenuHelp ) }
232233 >
233234 < span className = "fa fa-question-circle" > </ span >
234- </ button >
235+ </ BaseButton >
235236 </ Tooltip >
236237 { /* Click on the help icon, a dropdown menu with documentation, REST-docs and shortcuts (if available) opens */ }
237238 { displayMenuHelp && (
@@ -248,13 +249,13 @@ const Header = () => {
248249
249250 { /* Username */ }
250251 < div className = "nav-dd user-dd" id = "user-dd" ref = { containerUser } >
251- < button
252+ < BaseButton
252253 className = "h-nav"
253254 onClick = { ( ) => setMenuUser ( ! displayMenuUser ) }
254255 >
255256 { user . user . name || user . user . username }
256257 < span className = "dropdown-icon" />
257- </ button >
258+ </ BaseButton >
258259 { /* Click on username, a dropdown menu with the option to logout opens */ }
259260 { displayMenuUser && < MenuUser /> }
260261 </ div >
@@ -312,8 +313,7 @@ const MenuNotify = ({
312313 { healthStatus . map ( ( service , key ) => (
313314 < li key = { key } >
314315 { ! ! service . status && (
315- < button
316- className = "button-like-anchor"
316+ < ButtonLikeAnchor
317317 onClick = { ( ) => redirectToServices ( ) }
318318 >
319319 < span > { service . name } </ span >
@@ -326,7 +326,7 @@ const MenuNotify = ({
326326 { service . status }
327327 </ span >
328328 ) }
329- </ button >
329+ </ ButtonLikeAnchor >
330330 ) }
331331 </ li >
332332 ) ) }
0 commit comments