mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #13021 from overleaf/ae-writefull-promo-chrome
Only show the Writefull promo banner to Chromium browsers GitOrigin-RevId: 8a8765d2d55d431fd91360a821d5f9f994005ebc
This commit is contained in:
parent
d445ddd410
commit
a248da99c1
1 changed files with 9 additions and 0 deletions
|
@ -12,6 +12,11 @@ const eventSegmentation = {
|
|||
name: 'writefull',
|
||||
}
|
||||
|
||||
const isChromium = () =>
|
||||
(window.navigator as any).userAgentData?.brands?.some(
|
||||
(item: { brand: string }) => item.brand === 'Chromium'
|
||||
)
|
||||
|
||||
function WritefullPromoBanner() {
|
||||
const [show, setShow] = useState(() => {
|
||||
const show =
|
||||
|
@ -39,6 +44,10 @@ function WritefullPromoBanner() {
|
|||
return null
|
||||
}
|
||||
|
||||
if (!isChromium()) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<Notification
|
||||
bsStyle="info"
|
||||
|
|
Loading…
Reference in a new issue