feat: notice of the expire of education verify (#24210)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -48,6 +48,10 @@ type ProviderContextState = {
|
||||
enableEducationPlan: boolean
|
||||
isEducationWorkspace: boolean
|
||||
isEducationAccount: boolean
|
||||
allowRefreshEducationVerify: boolean
|
||||
educationAccountExpireAt: number | null
|
||||
isLoadingEducationAccountInfo: boolean
|
||||
isFetchingEducationAccountInfo: boolean
|
||||
webappCopyrightEnabled: boolean
|
||||
licenseLimit: {
|
||||
workspace_members: {
|
||||
@@ -90,6 +94,10 @@ const ProviderContext = createContext<ProviderContextState>({
|
||||
enableEducationPlan: false,
|
||||
isEducationWorkspace: false,
|
||||
isEducationAccount: false,
|
||||
allowRefreshEducationVerify: false,
|
||||
educationAccountExpireAt: null,
|
||||
isLoadingEducationAccountInfo: false,
|
||||
isFetchingEducationAccountInfo: false,
|
||||
webappCopyrightEnabled: false,
|
||||
licenseLimit: {
|
||||
workspace_members: {
|
||||
@@ -135,7 +143,7 @@ export const ProviderContextProvider = ({
|
||||
|
||||
const [enableEducationPlan, setEnableEducationPlan] = useState(false)
|
||||
const [isEducationWorkspace, setIsEducationWorkspace] = useState(false)
|
||||
const { data: isEducationAccount } = useEducationStatus(!enableEducationPlan)
|
||||
const { data: educationAccountInfo, isLoading: isLoadingEducationAccountInfo, isFetching: isFetchingEducationAccountInfo } = useEducationStatus(!enableEducationPlan)
|
||||
const [isAllowTransferWorkspace, setIsAllowTransferWorkspace] = useState(false)
|
||||
|
||||
const fetchPlan = async () => {
|
||||
@@ -223,7 +231,11 @@ export const ProviderContextProvider = ({
|
||||
datasetOperatorEnabled,
|
||||
enableEducationPlan,
|
||||
isEducationWorkspace,
|
||||
isEducationAccount: isEducationAccount?.result || false,
|
||||
isEducationAccount: educationAccountInfo?.is_student || false,
|
||||
allowRefreshEducationVerify: educationAccountInfo?.allow_refresh || false,
|
||||
educationAccountExpireAt: educationAccountInfo?.expire_at || null,
|
||||
isLoadingEducationAccountInfo,
|
||||
isFetchingEducationAccountInfo,
|
||||
webappCopyrightEnabled,
|
||||
licenseLimit,
|
||||
refreshLicenseLimit: fetchPlan,
|
||||
|
||||
Reference in New Issue
Block a user