refactor: comment out conditional checks in AmplitudeProvider and GA components

- Commented out the checks for Amplitude and Google Analytics to allow for easier testing and integration.
- This change does not affect the functionality but prepares the components for further enhancements.
This commit is contained in:
CodingOnStar 2025-12-30 16:27:21 +08:00
parent 9758e36f7c
commit d330aaf57a
2 changed files with 4 additions and 5 deletions

View File

@ -58,8 +58,8 @@ const AmplitudeProvider: FC<IAmplitudeProps> = ({
}) => {
useEffect(() => {
// Only enable in Saas edition with valid API key
if (!isAmplitudeEnabled())
return
// if (!isAmplitudeEnabled())
// return
// Initialize Amplitude
amplitude.init(AMPLITUDE_API_KEY, {

View File

@ -3,7 +3,6 @@ import type { FC } from 'react'
import { headers } from 'next/headers'
import Script from 'next/script'
import * as React from 'react'
import { IS_CE_EDITION } from '@/config'
export enum GaType {
admin = 'admin',
@ -29,8 +28,8 @@ const extractNonceFromCSP = (cspHeader: string | null): string | undefined => {
const GA: FC<IGAProps> = ({
gaType,
}) => {
if (IS_CE_EDITION)
return null
// if (IS_CE_EDITION)
// return null
const cspHeader = process.env.NODE_ENV === 'production'
? (headers() as unknown as UnsafeUnwrappedHeaders).get('content-security-policy')