Skip to content

Commit

Permalink
[CARE-4941] Update usages of @prezly/analytics to the latest API
Browse files Browse the repository at this point in the history
  • Loading branch information
e1himself committed May 10, 2024
1 parent 0a3d291 commit c706213
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modules/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Analytics, useAnalytics } from '@prezly/analytics-nextjs';
import { Tracking, useAnalytics } from '@prezly/analytics-nextjs';
import { Notification, Story } from '@prezly/sdk';
import {
PageSeo,
Expand Down Expand Up @@ -94,7 +94,7 @@ function Layout({ children, description, imageUrl, title, hasError }: PropsWithC

return (
<>
<Analytics />
<Tracking />
<Branding newsroom={newsroom} />
<PageSeo
title={title}
Expand Down
6 changes: 3 additions & 3 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AnalyticsContextProvider } from '@prezly/analytics-nextjs';
import { AnalyticsProvider } from '@prezly/analytics-nextjs';
import { DEFAULT_LOCALE, LocaleObject } from '@prezly/theme-kit-core';
import type { PageProps } from '@prezly/theme-kit-nextjs';
import { NewsroomContextProvider } from '@prezly/theme-kit-nextjs';
Expand Down Expand Up @@ -38,14 +38,14 @@ function App({ Component, pageProps }: AppProps) {
defaultLocale={DEFAULT_LOCALE}
messages={translations}
>
<AnalyticsContextProvider
<AnalyticsProvider
gallery={currentGallery}
isEnabled={isTrackingEnabled}
newsroom={newsroom}
story={currentStory}
>
<Component {...customPageProps} />
</AnalyticsContextProvider>
</AnalyticsProvider>
</IntlProvider>
</NewsroomContextProvider>
);
Expand Down

0 comments on commit c706213

Please sign in to comment.