diff --git a/src/admin/AdminAppConfigurationClient.tsx b/src/admin/AdminAppConfigurationClient.tsx index fbe1f1b1..be6889fc 100644 --- a/src/admin/AdminAppConfigurationClient.tsx +++ b/src/admin/AdminAppConfigurationClient.tsx @@ -25,10 +25,10 @@ import WarningNote from '@/components/WarningNote'; import { RiSpeedMiniLine } from 'react-icons/ri'; import Link from 'next/link'; import SecretGenerator from '../app-core/SecretGenerator'; -import CopyButton from '@/components/CopyButton'; import { PiPaintBrushHousehold } from 'react-icons/pi'; import { IoMdGrid } from 'react-icons/io'; import { CgDebug } from 'react-icons/cg'; +import EnvVar from '@/components/EnvVar'; export default function AdminAppConfigurationClient({ // Storage @@ -131,33 +131,10 @@ export default function AdminAppConfigurationClient({ } ; - const renderEnvVar = ( - variable: string, - minimal?: boolean, - ) => -
- - - `{variable}` - - {!minimal && } - -
; - const renderEnvVars = (variables: string[]) => -
- {variables.map(envVar => renderEnvVar(envVar))} +
+ {variables.map(envVar => + )}
; const renderSubStatus = ( diff --git a/src/admin/insights/AdminAppInsights.tsx b/src/admin/insights/AdminAppInsights.tsx index 7c75ee7d..e4fa2a47 100644 --- a/src/admin/insights/AdminAppInsights.tsx +++ b/src/admin/insights/AdminAppInsights.tsx @@ -20,6 +20,8 @@ import { } from '@/app-core/config'; import { getGitHubMetaWithFallback } from '../github'; +const BASIC_PHOTO_INSTALLATION_COUNT = 32; + const owner = VERCEL_GIT_REPO_OWNER; const repo = VERCEL_GIT_REPO_SLUG; const branch = VERCEL_GIT_BRANCH; @@ -67,7 +69,10 @@ export default async function AdminAppInsights() { noAi: !isAiTextGenerationEnabled, noAiRateLimiting: isAiTextGenerationEnabled && !hasVercelBlobStorage, photoMatting: photosCountPortrait > 0 && !MATTE_PHOTOS, - gridFirst: photosCount > 32 && !GRID_HOMEPAGE_ENABLED, + gridFirst: ( + photosCount >= BASIC_PHOTO_INSTALLATION_COUNT && + !GRID_HOMEPAGE_ENABLED + ), noStaticOptimization: !HAS_STATIC_OPTIMIZATION, }} photoStats={{ diff --git a/src/components/EnvVar.tsx b/src/components/EnvVar.tsx new file mode 100644 index 00000000..c4054349 --- /dev/null +++ b/src/components/EnvVar.tsx @@ -0,0 +1,32 @@ +import clsx from 'clsx/lite'; +import CopyButton from './CopyButton'; + +export default function EnvVar({ + variable, + includeCopyButton = true, +}: { + variable: string, + includeCopyButton?: boolean, +}) { + return ( +
+ + + {variable} + + {includeCopyButton && + } + +
+ ); +}