Skip to content

Commit

Permalink
bump: beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
7sferry committed Jun 11, 2024
1 parent 30862b3 commit fa4aacd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export default async function handler(_, res) {
};
let reports = await getReport(opt);
res.setHeader("Cache-Control", `public, max-age=${ttl}, stale-while-revalidate=300`).json({
nodes: reports,
reports: reports,
});
}
```
Expand All @@ -200,8 +200,8 @@ import { useEffect, useState } from "react";
const TopTrending = () => {
const [trendingReports, setTrendingReports] = useState([]);
useEffect(() => {
getTopTrendingReports().then((nodes) => {
setTrendingReports(nodes);
getTopTrendingReports().then((reports) => {
setTrendingReports(reports);
});
}, []);

Expand All @@ -228,7 +228,7 @@ async function getTopTrendingReports() {
return [];
}
const reportNode = await response.json();
return reportNode.nodes;
return reportNode.reports;
}

export default TopTrending;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-plugin-google-analytics-data-reporting-api",
"description": "Reporting API for Google Analytics 4 (GA4)",
"version": "2.0.0-beta1",
"version": "2.0.0-beta2",
"main": "index.js",
"author": "Ferry Suhandri",
"license": "MIT",
Expand Down

0 comments on commit fa4aacd

Please sign in to comment.