Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/google-analytics-4/frontend/src/apis/apiTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ export const ZRunReportData = z.object({
minimums: z.array(ZRow),
rowCount: z.number(),
metadata: z.object({
currencyCode: z.string(),
currencyCode: z.string().optional(),
dataLossFromOtherRow: z.boolean(),
timeZone: z.string(),
_currencyCode: z.string(),
_timeZone: z.string(),
timeZone: z.string().optional(),
_currencyCode: z.string().optional(),
_timeZone: z.string().optional(),
}),
propertyQuota: z.null(),
propertyQuota: z.unknown(),
kind: z.string(),
});

Expand Down
7 changes: 3 additions & 4 deletions apps/google-analytics-4/frontend/src/locations/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AnalyticsApp from 'components/main-app/AnalyticsApp/AnalyticsApp';
import { useCMA, useSDK } from '@contentful/react-apps-toolkit';
import { useSDK } from '@contentful/react-apps-toolkit';
import { SidebarExtensionSDK } from '@contentful/app-sdk';
import { useMemo } from 'react';
import { Skeleton } from '@contentful/f36-components';
Expand All @@ -13,7 +13,6 @@ import { contentfulContext } from 'helpers/contentfulContext';

const Sidebar = () => {
const sdk = useSDK<SidebarExtensionSDK>();
const cma = useCMA();
const installationParameters = sdk.parameters.installation as
| AppInstallationParameters
| undefined;
Expand All @@ -26,8 +25,8 @@ const Sidebar = () => {
(rule) => rule.contentTypeId === currentContentType
);
const api = useMemo(
() => new Api(contentfulContext(sdk), cma, serviceAccountKeyId),
[cma, sdk, serviceAccountKeyId]
() => new Api(contentfulContext(sdk), sdk.cma, serviceAccountKeyId),
[sdk, serviceAccountKeyId]
);

const hasInstallationParams = serviceAccountKeyId && propertyId;
Expand Down
Loading