diff --git a/components/brave_new_tab_ui/components/privateTab/index.tsx b/components/brave_new_tab_ui/components/privateTab/index.tsx index 4cc3e54bea94..ce352787afcf 100644 --- a/components/brave_new_tab_ui/components/privateTab/index.tsx +++ b/components/brave_new_tab_ui/components/privateTab/index.tsx @@ -9,6 +9,8 @@ import { Page, PageWrapper } from 'brave-ui/features/newTab' // Components group import PrivateTab from './privateTab' +import QwantTab from './qwantTab' +import QwantTorTab from './qwantTorTab' import TorTab from './torTab' interface Props { @@ -18,12 +20,30 @@ interface Props { } export default class NewPrivateTab extends React.PureComponent { + get isQwant () { + // This is not technically accurately describing whether + // the browser has been automatically set to a Qwant region. + // Temporarily we are detecting language here, but we should + // use the same setting logic as used during first-run. + // https://github.com/brave/brave-browser/issues/1632 + return navigator.language && + navigator.language.startsWith('de') || + navigator.language.startsWith('fr') + } + get currentWindow () { const { isTor, useAlternativePrivateSearchEngine, onChangePrivateSearchEngine } = this.props if (isTor) { + if (this.isQwant) { + return + } return } + if (this.isQwant) { + return + } + return ( { render () { const { isTor } = this.props return ( - + {this.currentWindow}