From 81636e0a488e094f990ecb47e344a1652ec8d774 Mon Sep 17 00:00:00 2001 From: Daniele Cammareri Date: Fri, 26 May 2023 08:35:09 +0200 Subject: [PATCH] fix: show cache warning to pro-lite console users PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9304 GitOrigin-RevId: 1acd4b070dd89ac83d19229b20d5d5c5c34d8d55 --- .../libs/console/legacy-ce/src/lib/utils/proConsole.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts b/frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts index f4347d852fb..7575a12f7f0 100644 --- a/frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts +++ b/frontend/libs/console/legacy-ce/src/lib/utils/proConsole.ts @@ -16,6 +16,10 @@ export const isProConsole = (env: ProConsoleEnv) => { return false; }; +export const isProLiteConsole = (env: ProConsoleEnv) => { + return env.consoleType === 'pro-lite'; +}; + // Commented this function so that it's not used // export const isProLiteConsole = (env: ProConsoleEnv) => { // return env.consoleType === 'pro-lite'; @@ -47,7 +51,9 @@ export const isEnvironmentSupportMultiTenantConnectionPooling = ( export const isImportFromOpenAPIEnabled = isProConsole; export const isDynamicDBRoutingEnabled = isProConsole; -export const isCachingEnabled = isProConsole; +// isProConsole or isProLiteConsole +export const isCachingEnabled = (env: ProConsoleEnv) => + isProConsole(env) || isProLiteConsole(env); export const isEEClassicConsole = () => { return window.__env.eeMode || false;