mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-24 20:34:16 +00:00
25 lines
650 B
TypeScript
25 lines
650 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, posthogHost } = useRuntimeConfig();
|
|
|
|
if (!isCloud() || !posthogEnabled || !posthogKey || !posthogHost) return null;
|
|
|
|
return (
|
|
<Suspense fallback={null}>
|
|
<RuntimeFeedbackSurvey
|
|
key={`${posthogKey}:${posthogHost}`}
|
|
posthogKey={posthogKey}
|
|
posthogHost={posthogHost}
|
|
/>
|
|
</Suspense>
|
|
);
|
|
}
|