feat(firebase): Add Firebase SDK and initialize Analytics
This commit integrates the Firebase SDK into the application to enable Firebase services, starting with Google Analytics. Key changes include: - Added the `firebase` package as a dependency. - Included Firebase project configuration variables in the production environment file. - Created a new `firebase.ts` utility to centralize Firebase app initialization. - Integrated the `FirebaseAnalytics` component into the root layout to enable analytics tracking across the entire application.
This commit is contained in:
+5
-2
@@ -3,6 +3,7 @@ import "@/css/style.css";
|
||||
import "react-tooltip/dist/react-tooltip.css";
|
||||
|
||||
import { ConditionalLayout } from "@/components/Layouts/conditional-layout";
|
||||
import FirebaseProvider from "@/components/Layouts/firebase-provider";
|
||||
import "flatpickr/dist/flatpickr.min.css";
|
||||
import "jsvectormap/dist/jsvectormap.css";
|
||||
import type { Metadata } from "next";
|
||||
@@ -27,9 +28,11 @@ export default function RootLayout({ children }: PropsWithChildren) {
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body>
|
||||
<Providers>
|
||||
<NextTopLoader color="#5750F1" showSpinner={false} />
|
||||
<FirebaseProvider>
|
||||
<NextTopLoader color="#5750F1" showSpinner={false} />
|
||||
|
||||
<ConditionalLayout>{children}</ConditionalLayout>
|
||||
<ConditionalLayout>{children}</ConditionalLayout>
|
||||
</FirebaseProvider>
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user