fix: Bad mixpanel config arising from env (#40262)

## Description

Earlier we were only checking for segment enabled to turn on mixpanel.
But an error happened when segment was enabled on a deployment but
mixpanel key was not present. This cause mixpanel config to be true but
without a key

To avoid this, we will also confirm mixpanel key exists and not just
segment

/ok-to-test tags="@tag.Sanity"

<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/14474665480>
> Commit: 2edc7ceece29ea7136d0a14f5f756f8a778b8bd0
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=14474665480&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 15 Apr 2025 17:18:28 UTC
<!-- end of auto-generated comment: Cypress test results  -->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved accuracy of Mixpanel tracking settings, ensuring Mixpanel is
only enabled when both Segment and Mixpanel tracking are enabled.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Hetu Nandu 2025-04-16 09:07:09 +05:30 committed by GitHub
parent 3dfc817beb
commit de7f73d508
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -213,7 +213,7 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => {
apiKey: googleRecaptchaSiteKey.value,
},
mixpanel: {
enabled: segment.enabled,
enabled: segment.enabled && mixpanel.enabled,
apiKey: mixpanel.value,
},
cloudHosting: