mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 13:43:41 +01: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:
+9
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user