@@ -16,6 +16,7 @@ import DesktopMenu from "../DesktopMenu/DesktopMenu";
1616import { Logo } from "../Logo" ;
1717import MobileMenu from "../MobileMenu/MobileMenu" ;
1818import { PhoneButton } from "../PhoneButton" ;
19+ import { Divider } from "../ui/Divider" ;
1920
2021export type MegaMenuWrapperProps = {
2122 className ?: ClassValue ;
@@ -26,6 +27,7 @@ export type MegaMenuWrapperProps = {
2627 rightSideActionsOverride ?: ( ) => JSX . Element ;
2728 callback ?: ( searchTerm : string ) => void ;
2829 linkComponent ?: LinkComponentType ;
30+ isFlagVisible ?: boolean ;
2931} & React . PropsWithChildren &
3032 ( Tagline | Title ) ;
3133
@@ -49,6 +51,7 @@ const MegaMenuContents: React.FC<MegaMenuWrapperProps> = ({
4951 menuBarItems,
5052 rightSideActionsOverride,
5153 callback,
54+ isFlagVisible = true ,
5255} ) => {
5356 const [ searchTerm , setSearchTerm ] = useState < string > ( "" ) ;
5457 const performSearch = ( e : React . FormEvent < HTMLFormElement > ) => {
@@ -114,8 +117,8 @@ const MegaMenuContents: React.FC<MegaMenuWrapperProps> = ({
114117 ) : (
115118 < PhoneButton className = "max-sm:hidden" />
116119 ) }
117- < CountryDropdown />
118- < Divider />
120+ { isFlagVisible && < CountryDropdown /> }
121+ { isFlagVisible && < Divider /> }
119122 < button
120123 type = "button"
121124 className = "inline-flex items-center justify-center rounded-md px-1 text-gray-700 xs:px-4"
@@ -155,10 +158,6 @@ const MegaMenuContents: React.FC<MegaMenuWrapperProps> = ({
155158 ) ;
156159} ;
157160
158- const Divider : React . FC = ( ) => {
159- return < div className = "h-4 w-px bg-gray-700/30 sm:block" > </ div > ;
160- } ;
161-
162161const MegaMenuLayout : React . FC < MegaMenuWrapperProps > = ( {
163162 children,
164163 ...props
0 commit comments