mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -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',
|
name: 'writefull',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isChromium = () =>
|
||||||
|
(window.navigator as any).userAgentData?.brands?.some(
|
||||||
|
(item: { brand: string }) => item.brand === 'Chromium'
|
||||||
|
)
|
||||||
|
|
||||||
function WritefullPromoBanner() {
|
function WritefullPromoBanner() {
|
||||||
const [show, setShow] = useState(() => {
|
const [show, setShow] = useState(() => {
|
||||||
const show =
|
const show =
|
||||||
|
@ -39,6 +44,10 @@ function WritefullPromoBanner() {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isChromium()) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Notification
|
<Notification
|
||||||
bsStyle="info"
|
bsStyle="info"
|
||||||
|
|
Loading…
Reference in a new issue