@devboldly/react-use-google-analytics-embed-api
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -1,9 +0,9 @@ | ||
import { GoogleAnalyticsEmbedAPILoader } from './useGoogleAnalyticsEmbedApi'; | ||
import { GoogleAnalyticsEmbedAPI } from './GoogleAnalyticsEmbedAPI'; | ||
/** | ||
* Hook for https://developers.google.com/analytics/devguides/reporting/embed/v1/component-reference#datachart | ||
* | ||
* @param gapiLoader | ||
* @param gapi GoogleAnalyticsEmbedAPI | ||
* @param query https://developers.google.com/analytics/devguides/reporting/core/v3/reference#q_summary | ||
* @param chart https://developers.google.com/analytics/devguides/reporting/embed/v1/component-reference#datachart | ||
*/ | ||
export declare const useDataChart: (gapiLoader: GoogleAnalyticsEmbedAPILoader, query: any, chart: any) => void; | ||
export declare const useDataChart: (gapi: GoogleAnalyticsEmbedAPI, query: any, chart: any) => void; |
@@ -14,9 +14,8 @@ "use strict"; | ||
* | ||
* @param gapiLoader | ||
* @param gapi GoogleAnalyticsEmbedAPI | ||
* @param query https://developers.google.com/analytics/devguides/reporting/core/v3/reference#q_summary | ||
* @param chart https://developers.google.com/analytics/devguides/reporting/embed/v1/component-reference#datachart | ||
*/ | ||
exports.useDataChart = function (gapiLoader, query, chart) { | ||
exports.useDataChart = function (gapi, query, chart) { | ||
var _a = React.useState(), dataChart = _a[0], setDataChart = _a[1]; | ||
var gapi = gapiLoader.gapi; | ||
React.useEffect(function () { | ||
@@ -23,0 +22,0 @@ if (gapi) { |
{ | ||
"name": "@devboldly/react-use-google-analytics-embed-api", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"author": "Dev Boldly <devboldly@gmail.com>", | ||
@@ -5,0 +5,0 @@ "description": "React hook to async load the Google Analytics Embed API.", |
88299
1968