This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch scarf-pixel
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/scarf-pixel by this push:
     new ffeed6a081 fixing linting, adding docstrings
ffeed6a081 is described below

commit ffeed6a08160fb6525c59900e22306f42e451174
Author: Evan Rusackas <[email protected]>
AuthorDate: Mon Nov 27 10:18:43 2023 -0700

    fixing linting, adding docstrings
---
 .../src/components/TelemetryPixel/index.tsx             | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/superset-frontend/src/components/TelemetryPixel/index.tsx 
b/superset-frontend/src/components/TelemetryPixel/index.tsx
index c9c3a55dbb..2ab9496d86 100644
--- a/superset-frontend/src/components/TelemetryPixel/index.tsx
+++ b/superset-frontend/src/components/TelemetryPixel/index.tsx
@@ -26,11 +26,22 @@ interface TelemetryPixelProps {
   build?: string;
 }
 
-const TelemetryPixel = ({ =
+/**
+ * Renders a telemetry pixel component to capture anonymous, agregated 
telemetry via Scarf.
+ * This can be disabled with the ENABLE_TELEMETRY feature flag
+ *
+ * @component
+ * @param {TelemetryPixelProps} props - The props for the TelemetryPixel 
component.
+ * @param {string} props.version - The version of  Superset that's currently 
in use.
+ * @param {string} props.sha - The SHA of Superset that's currently in use.
+ * @param {string} props.build - The build of Superset that's currently in use.
+ * @returns {JSX.Element | null} The rendered TelemetryPixel component.
+ */
+const TelemetryPixel = ({
   version = 'unknownVersion',
   sha = 'unknownSHA',
-  build = 'unknownBuild'
-}: TelemetryPixelProps) => {
+  build = 'unknownBuild',
+}: TelemetryPixelProps): JSX.Element | null => {
   const pixelId = '0d3461e1-abb1-4691-a0aa-5ed50de66af0';
   const pixelPath = 
`https://apachesuperset.gateway.scarf.sh/pixel/${pixelId}/${version}/${sha}/${build}`;
   return isFeatureEnabled(FeatureFlag.ENABLE_TELEMETRY) ? (

Reply via email to