fix: ui tweaks including button styles, texts, and missing account link

This commit is contained in:
Radosław Smoliński
2026-06-22 00:45:57 +02:00
parent 25a0734a80
commit 6bdfe18e18
10 changed files with 129 additions and 32 deletions
+26
View File
@@ -0,0 +1,26 @@
"use client";
import { useEffect } from "react";
import { useConsentStore } from "@/lib/consent-store";
import { GoogleAnalytics, GoogleTagManager } from "@next/third-parties/google";
export function AnalyticsWrapper() {
const { analytics, marketing, isInitialized, initialize } = useConsentStore();
useEffect(() => {
initialize();
}, [initialize]);
if (!isInitialized) return null;
return (
<>
{/* Ładujemy GTM tylko jeśli zgoda na marketing ATAK LUB analitykę,
w zależności od rygorystyczności, zazwyczaj GTM potrzebuje analityki/marketingu */}
{(analytics || marketing) && <GoogleTagManager gtmId="GTM-MBMRCD2N" />}
{/* Ładujemy GA4 tylko jeśli użytkownik zgodził się na analitykę */}
{analytics && <GoogleAnalytics gaId="G-1NGTSR4TWD" />}
</>
);
}
+16
View File
@@ -0,0 +1,16 @@
"use client";
import { useConsentStore } from "@/lib/consent-store";
export function CookieSettingsTrigger() {
const openBanner = useConsentStore((state) => state.openBanner);
return (
<button
onClick={openBanner}
className="text-slate-400 hover:text-accent transition-colors text-xs text-center sm:text-left underline underline-offset-2"
>
Zarządzaj plikami cookies
</button>
);
}