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:
roo hutton
2025-02-05 08:49:36 +00:00
committed by Copybot
parent ff92b70a7f
commit 77fa5cf784

View File

@@ -1,16 +1,16 @@
import getMeta from '@/utils/meta'
import {
studentRoles,
StudentRole,
} from '../../../../../modules/onboarding/frontend/js/components/data/roles'
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() {
const odcRole = getMeta('ol-odcRole')
const isStudent = useMemo(
() => studentRoles.includes(odcRole as StudentRole),
[odcRole]
)
const isStudent = useMemo(() => studentRoles.includes(odcRole), [odcRole])
return (
<div>