Skip to content

Commit 139198b

Browse files
fiveonefour-github-botclaudecallicles
committed
fix(c15t): address review findings on categories and stylesheet order
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Nicolas Joseph <nicolas@fiveonefour.com>
1 parent 084f9df commit 139198b

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

app/globals.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
@import "tailwindcss";
22
@import "tw-animate-css";
3+
/* Keep c15t last in the top-level @import block so its component layer and
4+
theme tokens are not overridden by preset styles (Tailwind v4 setup). */
5+
@import "@c15t/nextjs/styles.css";
36

47
@theme {
58
/* Font families */

components/consent-provider.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
type Theme,
1111
useConsentManager,
1212
} from "@c15t/nextjs"
13-
import "@c15t/nextjs/styles.css"
1413

1514
const backendURL = process.env.NEXT_PUBLIC_C15T_URL
1615

@@ -65,6 +64,11 @@ const uiOptions = {
6564
theme,
6665
colorScheme: "dark",
6766
legalLinks: { privacyPolicy: { href: "/privacy" }, termsOfService: { href: "/terms" } },
67+
// 2.x gates both the preferences toggles and `has(...)` on this list: the store
68+
// defaults to `["necessary"]`, and "Accept all" only grants categories listed
69+
// here. Without `measurement`, `has("measurement")` stays false forever and
70+
// `ConsentAnalytics` never mounts Vercel Analytics.
71+
consentCategories: ["necessary", "measurement"],
6872
} satisfies Partial<ConsentManagerOptions>
6973

7074
const options: ConsentManagerOptions = backendURL

0 commit comments

Comments
 (0)