From 6ba4b0141ab6f5b41372586cb575d70e30b731fa Mon Sep 17 00:00:00 2001 From: Jimmy Domagala-Tang Date: Thu, 5 Dec 2024 13:52:03 -0500 Subject: [PATCH] Merge pull request #22255 from overleaf/jdt-rm-free-suggestion-text-on-purchase [Web] remove uses left indicator after potential add-on purchase GitOrigin-RevId: c9c839b90eea62b9d0dbeb4ae81321f303582c2c --- services/web/frontend/js/shared/context/editor-context.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/web/frontend/js/shared/context/editor-context.tsx b/services/web/frontend/js/shared/context/editor-context.tsx index c9fc23440b..ac1c698ec3 100644 --- a/services/web/frontend/js/shared/context/editor-context.tsx +++ b/services/web/frontend/js/shared/context/editor-context.tsx @@ -49,6 +49,8 @@ export const EditorContext = createContext< currentPopup: string | null setCurrentPopup: Dispatch> setOutOfSync: (value: boolean) => void + assistantUpgraded: boolean + setAssistantUpgraded: (value: boolean) => void hasPremiumSuggestion: boolean setHasPremiumSuggestion: (value: boolean) => void setPremiumSuggestionResetDate: (date: Date) => void @@ -95,6 +97,7 @@ export const EditorProvider: FC = ({ children }) => { ) const [currentPopup, setCurrentPopup] = useState(null) + const [assistantUpgraded, setAssistantUpgraded] = useState(false) const [hasPremiumSuggestion, setHasPremiumSuggestion] = useState( () => { return Boolean( @@ -205,6 +208,8 @@ export const EditorProvider: FC = ({ children }) => { setHasPremiumSuggestion, premiumSuggestionResetDate, setPremiumSuggestionResetDate, + assistantUpgraded, + setAssistantUpgraded, }), [ cobranding, @@ -229,6 +234,8 @@ export const EditorProvider: FC = ({ children }) => { setHasPremiumSuggestion, premiumSuggestionResetDate, setPremiumSuggestionResetDate, + assistantUpgraded, + setAssistantUpgraded, ] )