Merge pull request #23359 from overleaf/rh-roles-e2e-fix
Fix cross-module import in compile timeout paywall GitOrigin-RevId: a54226c8bef65e0483a3eee614f0ab54f5828c97
This commit is contained in:
+8
-8
@@ -1,16 +1,16 @@
|
|||||||
import getMeta from '@/utils/meta'
|
import getMeta from '@/utils/meta'
|
||||||
import {
|
|
||||||
studentRoles,
|
|
||||||
StudentRole,
|
|
||||||
} from '../../../../../modules/onboarding/frontend/js/components/data/roles'
|
|
||||||
import { useMemo } from 'react'
|
import { useMemo } from 'react'
|
||||||
|
|
||||||
|
const studentRoles = [
|
||||||
|
'High-school student',
|
||||||
|
'Undergraduate student',
|
||||||
|
"Master's student (e.g. MSc, MA)",
|
||||||
|
'Doctoral student (e.g. PhD, MD, EngD)',
|
||||||
|
]
|
||||||
|
|
||||||
function TimeoutUpgradePaywallPrompt() {
|
function TimeoutUpgradePaywallPrompt() {
|
||||||
const odcRole = getMeta('ol-odcRole')
|
const odcRole = getMeta('ol-odcRole')
|
||||||
const isStudent = useMemo(
|
const isStudent = useMemo(() => studentRoles.includes(odcRole), [odcRole])
|
||||||
() => studentRoles.includes(odcRole as StudentRole),
|
|
||||||
[odcRole]
|
|
||||||
)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user