mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Cleanup AiErrorAssistant todos post plans changes (#35067)
* feat: cleaning up ai quota leftovers fix: removing more straggler invos * fix: featureUpdater still need analyticsId in the user projection * feat: updating cypress tests to also check for fair usage text GitOrigin-RevId: 09c1167106c144084c111beea56867f6aa4a0906
This commit is contained in:
committed by
Copybot
parent
275d381656
commit
ba76fda37b
@@ -34,12 +34,7 @@ export const UserFeaturesProvider: FC<React.PropsWithChildren> = ({
|
||||
|
||||
useEffect(() => {
|
||||
const listener = async ({ isPremium }: { isPremium: boolean }) => {
|
||||
// todo: quota clean-up: remove once we are transitioned off aiErrorAssistant naming
|
||||
const hasPremiumQuota = hasUnlimitedAi
|
||||
const alreadyPremium =
|
||||
features?.aiErrorAssistant === isPremium ||
|
||||
hasPremiumQuota === isPremium
|
||||
if (alreadyPremium) {
|
||||
if (hasUnlimitedAi === isPremium) {
|
||||
// the user is premium on writefull and has the AI assist, no need to refresh the features
|
||||
return
|
||||
}
|
||||
@@ -55,7 +50,7 @@ export const UserFeaturesProvider: FC<React.PropsWithChildren> = ({
|
||||
listener
|
||||
)
|
||||
}
|
||||
}, [features?.aiErrorAssistant, writefullInstance])
|
||||
}, [writefullInstance])
|
||||
|
||||
return (
|
||||
<UserFeaturesContext.Provider value={features}>
|
||||
|
||||
Reference in New Issue
Block a user