@@ -12,11 +12,13 @@ import { SearchScope } from '../../../types/searchScope'
1212import { api , github } from '../../utils/externalLinks'
1313import { ReopenAnalyticsConsentButton } from 'app/components/AnalyticsConsent'
1414
15- const FooterBox = styled ( Box ) ( ( { theme } ) => ( {
15+ const FooterBox = styled ( Box , {
16+ shouldForwardProp : prop => prop !== 'enableMobileSearch' ,
17+ } ) < { enableMobileSearch : boolean } > ( ( { theme, enableMobileSearch } ) => ( {
1618 display : 'flex' ,
1719 width : '100%' ,
1820 justifyContent : 'space-between' ,
19- padding : theme . spacing ( 5 , 4 ) ,
21+ padding : theme . spacing ( 5 , enableMobileSearch ? 4 : 0 ) ,
2022 [ theme . breakpoints . up ( 'sm' ) ] : {
2123 flex : '0 1 100%' ,
2224 padding : theme . spacing ( 5 , 0 ) ,
@@ -44,9 +46,10 @@ const StyledTypography = styled(Typography)(() => ({
4446interface FooterProps {
4547 scope ?: SearchScope
4648 mobileSearchAction ?: ReactNode
49+ enableMobileSearch ?: boolean
4750}
4851
49- export const Footer : FC < FooterProps > = ( { scope, mobileSearchAction } ) => {
52+ export const Footer : FC < FooterProps > = ( { scope, mobileSearchAction, enableMobileSearch = true } ) => {
5053 const theme = useTheme ( )
5154 const { t } = useTranslation ( )
5255 const { isMobile, isTablet } = useScreenSize ( )
@@ -56,9 +59,13 @@ export const Footer: FC<FooterProps> = ({ scope, mobileSearchAction }) => {
5659
5760 return (
5861 < footer >
59- < FooterBox >
62+ < FooterBox enableMobileSearch = { enableMobileSearch } >
6063 { isTablet ? (
61- < AppendMobileSearch scope = { scope } action = { isMobile && mobileSearchAction } >
64+ < AppendMobileSearch
65+ scope = { scope }
66+ action = { isMobile && mobileSearchAction }
67+ enableMobileSearch = { enableMobileSearch }
68+ >
6269 < StyledTypography variant = "footer" >
6370 < Box sx = { { whiteSpace : 'nowrap' } } > { t ( 'footer.mobileTitle' ) } |</ Box >
6471 < Box sx = { privacyPolicyLinkStyles } >
0 commit comments