create-nextblock 0.2.77 → 0.2.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@nextblock-cms/ui"
|
|
1
|
+
import { Alert, AlertDescription, AlertTitle, Card, CardContent, CardDescription, CardHeader, CardTitle } from "@nextblock-cms/ui"
|
|
2
2
|
import { Calendar, FileText, PenTool, Users, Eye } from "lucide-react"
|
|
3
3
|
import { getDashboardStats } from "./actions"
|
|
4
4
|
|
|
5
5
|
export default async function CmsDashboardPage() {
|
|
6
6
|
const stats = await getDashboardStats();
|
|
7
|
+
const gtmId = process.env.NEXT_PUBLIC_GTM_ID;
|
|
8
|
+
const showWarning = !gtmId && gtmId !== "false";
|
|
7
9
|
|
|
8
10
|
return (
|
|
9
11
|
<div className="w-full space-y-6">
|
|
12
|
+
{showWarning && (
|
|
13
|
+
<Alert variant="destructive">
|
|
14
|
+
<AlertTitle>Google Tag Manager Not Configured (Analytics)</AlertTitle>
|
|
15
|
+
<AlertDescription>
|
|
16
|
+
The <code>NEXT_PUBLIC_GTM_ID</code> environment variable is missing. Add your GTM Container ID
|
|
17
|
+
(GTM-XXXXXX) to your .env file to enable tracking. To hide this warning without enabling analytics,
|
|
18
|
+
set the variable to 'false'.
|
|
19
|
+
</AlertDescription>
|
|
20
|
+
</Alert>
|
|
21
|
+
)}
|
|
10
22
|
<div>
|
|
11
23
|
<h2 className="text-xl font-bold mb-2">Welcome to the CMS Dashboard</h2>
|
|
12
24
|
<p className="text-muted-foreground">Manage your content and monitor site performance from one place.</p>
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import '@nextblock-cms/ui/styles/globals.css';
|
|
2
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
2
3
|
import '@nextblock-cms/editor/styles/editor.css';
|
|
3
4
|
// app/layout.tsx
|
|
4
|
-
import { EnvVarWarning } from "
|
|
5
|
-
import { SandboxBanner } from "
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import { EnvVarWarning } from "../components/env-var-warning";
|
|
6
|
+
import { SandboxBanner } from "../components/SandboxBanner";
|
|
7
|
+
import { SpeedInsights } from "@vercel/speed-insights/next"
|
|
8
|
+
// eslint-disable-next-line @nx/enforce-module-boundaries
|
|
9
|
+
import { GoogleTagManager } from '@next/third-parties/google'
|
|
10
|
+
import { ThemeSwitcher } from '../components/theme-switcher';
|
|
8
11
|
import type { Metadata } from 'next';
|
|
9
|
-
import Header from "
|
|
10
|
-
import FooterNavigation from "
|
|
12
|
+
import Header from "../components/Header";
|
|
13
|
+
import FooterNavigation from "../components/FooterNavigation";
|
|
11
14
|
import { Providers } from './providers';
|
|
12
15
|
import { ToasterProvider } from './ToasterProvider';
|
|
13
16
|
import { createClient as createSupabaseServerClient, getProfileWithRoleServerSide } from '@nextblock-cms/db/server';
|
|
14
17
|
import { getActiveLanguagesServerSide } from '@nextblock-cms/db/server';
|
|
15
|
-
import { getNavigationMenu } from '
|
|
16
|
-
import { getActiveLogo } from '
|
|
17
|
-
import { getCopyrightSettings } from '
|
|
18
|
-
import { getTranslations } from '
|
|
18
|
+
import { getNavigationMenu } from './cms/navigation/actions';
|
|
19
|
+
import { getActiveLogo } from './cms/settings/logos/actions';
|
|
20
|
+
import { getCopyrightSettings } from './cms/settings/copyright/actions';
|
|
21
|
+
import { getTranslations } from './cms/settings/extra-translations/actions';
|
|
19
22
|
import type { Database } from '@nextblock-cms/db';
|
|
20
23
|
import { headers, cookies } from 'next/headers';
|
|
21
24
|
|
|
@@ -174,7 +177,7 @@ export default async function RootLayout({
|
|
|
174
177
|
<link rel="dns-prefetch" href="https://db.ppcppwsfnrptznvbxnsz.supabase.co" />
|
|
175
178
|
<link rel="dns-prefetch" href="https://realtime.supabase.com" />
|
|
176
179
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
177
|
-
<
|
|
180
|
+
<SpeedInsights/>
|
|
178
181
|
</head>
|
|
179
182
|
<body className="bg-background text-foreground min-h-screen flex flex-col">
|
|
180
183
|
<Providers
|
|
@@ -217,6 +220,7 @@ export default async function RootLayout({
|
|
|
217
220
|
</footer>
|
|
218
221
|
</div>
|
|
219
222
|
</Providers>
|
|
223
|
+
<GoogleTagManager gtmId={process.env.NEXT_PUBLIC_GTM_ID || ""} />
|
|
220
224
|
</body>
|
|
221
225
|
</html>
|
|
222
226
|
);
|