Minor bug fixes

This commit is contained in:
Shaurya Sharma 2025-04-04 15:39:02 +05:30
parent 2481bda0c8
commit c9a70058d3

View file

@ -199,7 +199,7 @@ export const PreviewBox = ({
setError({
message: isServerConstant
? 'Server side variables cannot be used in apps'
? 'Server variables cannot be used in apps'
: isSecretError
? 'secrets cannot be used in apps'
: _error,
@ -249,6 +249,8 @@ const RenderResolvedValue = ({
isServerConstant = false,
isLargeDataset,
}) => {
const isServerSideGlobalEnabled = useStore((state) => !!state?.license?.featureAccess?.serverSideGlobal, shallow);
const computeCoersionPreview = (resolvedValue, coersionData) => {
if (coersionData?.typeBeforeCoercion === coersionData?.typeAfterCoercion) return resolvedValue;
@ -272,7 +274,9 @@ const RenderResolvedValue = ({
: previewType;
const previewContent = isServerConstant
? 'Server constants would be resolved at runtime'
? isServerSideGlobalEnabled
? 'Server variables would be resolved at runtime'
: 'Server variables are only available in paid plans'
: isSecretConstant
? 'Values of secret constants are hidden'
: !withValidation