|
@@ -4,7 +4,6 @@ import { sendMB } from '@/infrastructure/event-tracking'
|
|
|
import customLocalStorage from '@/infrastructure/local-storage'
|
|
import customLocalStorage from '@/infrastructure/local-storage'
|
|
|
import WritefullLogo from '@/shared/svgs/writefull-logo'
|
|
import WritefullLogo from '@/shared/svgs/writefull-logo'
|
|
|
import OLButton from '@/features/ui/components/ol/ol-button'
|
|
import OLButton from '@/features/ui/components/ol/ol-button'
|
|
|
-import getMeta from '@/utils/meta'
|
|
|
|
|
|
|
|
|
|
const eventSegmentation = {
|
|
const eventSegmentation = {
|
|
|
location: 'dashboard-banner',
|
|
location: 'dashboard-banner',
|
|
@@ -21,11 +20,6 @@ function WritefullPremiumPromoBanner({
|
|
|
setShow: (value: boolean) => void
|
|
setShow: (value: boolean) => void
|
|
|
onDismiss: () => void
|
|
onDismiss: () => void
|
|
|
}) {
|
|
}) {
|
|
|
- // dont show the add to WF commons users since their license already includes it
|
|
|
|
|
- const userAffiliations = getMeta('ol-userAffiliations') || []
|
|
|
|
|
- const hasWritefullCommons = userAffiliations.some(
|
|
|
|
|
- affil => affil.institution?.writefullCommonsAccount
|
|
|
|
|
- )
|
|
|
|
|
const handleClose = useCallback(() => {
|
|
const handleClose = useCallback(() => {
|
|
|
customLocalStorage.setItem('has_dismissed_writefull_promo_banner', true)
|
|
customLocalStorage.setItem('has_dismissed_writefull_promo_banner', true)
|
|
|
setShow(false)
|
|
setShow(false)
|
|
@@ -33,7 +27,7 @@ function WritefullPremiumPromoBanner({
|
|
|
onDismiss()
|
|
onDismiss()
|
|
|
}, [setShow, onDismiss])
|
|
}, [setShow, onDismiss])
|
|
|
|
|
|
|
|
- if (!show || hasWritefullCommons) {
|
|
|
|
|
|
|
+ if (!show) {
|
|
|
return null
|
|
return null
|
|
|
}
|
|
}
|
|
|
|
|
|