import React, { useState } from "react"; import Card from "antd/lib/card"; import Button from "antd/lib/button"; import Typography from "antd/lib/typography"; import { clientConfig } from "@/services/auth"; import HelpTrigger from "@/components/HelpTrigger"; import DynamicComponent from "@/components/DynamicComponent"; import OrgSettings from "@/services/organizationSettings"; const Text = Typography.Text; function BeaconConsent() { const [hide, setHide] = useState(false); if (!clientConfig.showBeaconConsentMessage || hide) { return null; } const hideConsentCard = () => { clientConfig.showBeaconConsentMessage = false; setHide(true); }; const confirmConsent = confirm => { let message = "🙏 Thank you."; if (!confirm) { message = "Settings Saved."; } OrgSettings.save({ beacon_consent: confirm }, message) // .then(() => { // // const settings = get(response, 'settings'); // // this.setState({ settings, formValues: { ...settings } }); // }) .finally(hideConsentCard); }; return (
Would you be ok with sharing anonymous usage data with the Redash team?{" "} } bordered={false}> Help Redash improve by automatically sending anonymous usage data:
  • Number of users, queries, dashboards, alerts, widgets and visualizations.
  • Types of data sources, alert destinations and visualizations.
All data is aggregated and will never include any sensitive or private data.
You can change this setting anytime from the Organization Settings{" "} page.
); } export default BeaconConsent;