mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #20404 from overleaf/revert-20389-jdt-add-writefull-commons-to-v1
Revert "Add writefull commons to v1" GitOrigin-RevId: 703e2873cb64059f6a3881d6fc7f3c475caf5abd
This commit is contained in:
parent
aca9466c49
commit
d41e069c69
5 changed files with 1 additions and 14 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ const userEmailData: UserEmailData & { affiliation: Affiliation } = {
|
||||||
department: 'Art History',
|
department: 'Art History',
|
||||||
institution: {
|
institution: {
|
||||||
commonsAccount: false,
|
commonsAccount: false,
|
||||||
writefullCommonsAccount: false,
|
|
||||||
confirmed: true,
|
confirmed: true,
|
||||||
id: 1,
|
id: 1,
|
||||||
isUniversity: true,
|
isUniversity: true,
|
||||||
|
|
|
@ -23,7 +23,6 @@ const userData1: UserEmailData & { affiliation: Affiliation } = {
|
||||||
department: null,
|
department: null,
|
||||||
institution: {
|
institution: {
|
||||||
commonsAccount: false,
|
commonsAccount: false,
|
||||||
writefullCommonsAccount: false,
|
|
||||||
confirmed: true,
|
confirmed: true,
|
||||||
id: 1,
|
id: 1,
|
||||||
isUniversity: false,
|
isUniversity: false,
|
||||||
|
@ -54,7 +53,6 @@ const userData2: UserEmailData & { affiliation: Affiliation } = {
|
||||||
department: 'Art History',
|
department: 'Art History',
|
||||||
institution: {
|
institution: {
|
||||||
commonsAccount: false,
|
commonsAccount: false,
|
||||||
writefullCommonsAccount: false,
|
|
||||||
confirmed: true,
|
confirmed: true,
|
||||||
id: 1,
|
id: 1,
|
||||||
isUniversity: false,
|
isUniversity: false,
|
||||||
|
|
|
@ -24,7 +24,6 @@ export const professionalUserData: UserEmailData & {
|
||||||
department: 'Art History',
|
department: 'Art History',
|
||||||
institution: {
|
institution: {
|
||||||
commonsAccount: false,
|
commonsAccount: false,
|
||||||
writefullCommonsAccount: false,
|
|
||||||
confirmed: true,
|
confirmed: true,
|
||||||
id: 1,
|
id: 1,
|
||||||
isUniversity: false,
|
isUniversity: false,
|
||||||
|
@ -57,7 +56,6 @@ export const unconfirmedCommonsUserData: UserEmailData & {
|
||||||
department: 'Art History',
|
department: 'Art History',
|
||||||
institution: {
|
institution: {
|
||||||
commonsAccount: true,
|
commonsAccount: true,
|
||||||
writefullCommonsAccount: false,
|
|
||||||
confirmed: true,
|
confirmed: true,
|
||||||
id: 1,
|
id: 1,
|
||||||
isUniversity: false,
|
isUniversity: false,
|
||||||
|
@ -87,7 +85,6 @@ export const ssoUserData: UserEmailData = {
|
||||||
department: 'Art History',
|
department: 'Art History',
|
||||||
institution: {
|
institution: {
|
||||||
commonsAccount: true,
|
commonsAccount: true,
|
||||||
writefullCommonsAccount: false,
|
|
||||||
confirmed: true,
|
confirmed: true,
|
||||||
id: 2,
|
id: 2,
|
||||||
isUniversity: true,
|
isUniversity: true,
|
||||||
|
|
|
@ -2,7 +2,6 @@ import { Nullable } from './utils'
|
||||||
|
|
||||||
export type Institution = {
|
export type Institution = {
|
||||||
commonsAccount: boolean
|
commonsAccount: boolean
|
||||||
writefullCommonsAccount: boolean
|
|
||||||
confirmed: boolean
|
confirmed: boolean
|
||||||
id: number
|
id: number
|
||||||
isUniversity: boolean
|
isUniversity: boolean
|
||||||
|
|
Loading…
Reference in a new issue