diff --git a/frontend/providers/dbprovider/src/store/user.ts b/frontend/providers/dbprovider/src/store/user.ts index ac77b3bbd39..4fa85fb4ad8 100644 --- a/frontend/providers/dbprovider/src/store/user.ts +++ b/frontend/providers/dbprovider/src/store/user.ts @@ -10,7 +10,7 @@ type State = { balance: number; userQuota: UserQuotaItemType[]; loadUserQuota: () => Promise; - checkQuotaAllow: (request: DBEditType, usedData?: DBEditType) => I18nCommonKey; + checkQuotaAllow: (request: DBEditType, usedData?: DBEditType) => I18nCommonKey | undefined; }; export const useUserStore = create()( @@ -26,7 +26,7 @@ export const useUserStore = create()( }); return null; }, - checkQuotaAllow: ({ cpu, memory, storage, replicas }, usedData): I18nCommonKey => { + checkQuotaAllow: ({ cpu, memory, storage, replicas }, usedData): I18nCommonKey | undefined => { const quote = get().userQuota; const request = { @@ -54,7 +54,7 @@ export const useUserStore = create()( } }); - return exceedQuota?.type ? overLimitTip[exceedQuota.type] : 'app.cpu_exceeds_quota'; + return exceedQuota?.type ? overLimitTip[exceedQuota.type] : undefined; } })) )