mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-04 02:04:06 +00:00
29 lines
779 B
TypeScript
29 lines
779 B
TypeScript
"use client";
|
|
|
|
import { lazy, Suspense } from "react";
|
|
|
|
import { useRuntimeConfig } from "@/hooks/use-runtime-config";
|
|
import { isCloud } from "@/lib/shared/env";
|
|
|
|
const RuntimeFeedbackSurvey = lazy(() => import("./runtime-feedback-survey"));
|
|
|
|
export function FeedbackSurvey() {
|
|
const { posthogEnabled, posthogKey, posthogIngestionHost, posthogUiHost } =
|
|
useRuntimeConfig();
|
|
|
|
if (!isCloud() || !posthogEnabled || !posthogKey || !posthogIngestionHost) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Suspense fallback={null}>
|
|
<RuntimeFeedbackSurvey
|
|
key={`${posthogKey}:${posthogIngestionHost}:${posthogUiHost}`}
|
|
posthogKey={posthogKey}
|
|
posthogIngestionHost={posthogIngestionHost}
|
|
posthogUiHost={posthogUiHost}
|
|
/>
|
|
</Suspense>
|
|
);
|
|
}
|