Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ lcov.info
# Tools
.nuke/

# TypeScript
*.tsbuildinfo

# IDE (VS Code / Rider / Visual Studio)
*.DotSettings
*.DotSettings.user
Expand Down Expand Up @@ -45,3 +48,4 @@ src/Mocha/benchmarks/Mocha.Mediator.Benchmarks/Generated/
.work/
Directory.Build.user.props
appsettings.user.json
.playwright-mcp/
34 changes: 34 additions & 0 deletions website/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from "react";
import type { Metadata } from "next";
import { Radio_Canada } from "next/font/google";
import Script from "next/script";
import { GoogleAnalytics } from "@next/third-parties/google";

import { Providers } from "@/lib/providers";
import { siteMetadata } from "@/lib/site-config";
Expand Down Expand Up @@ -34,7 +36,39 @@ export default function RootLayout({
return (
<html lang="en" className={radioCanada.variable}>
<body>
{process.env.NEXT_PUBLIC_COOKIEBOT_CBID && (
<>
<Script
id="google-consent-default"
strategy="beforeInteractive"
dangerouslySetInnerHTML={{
__html: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
analytics_storage: 'denied',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied',
wait_for_update: 500
});
`,
}}
/>
<Script
id="Cookiebot"
src="https://consent.cookiebot.com/uc.js"
data-cbid={process.env.NEXT_PUBLIC_COOKIEBOT_CBID}
data-blockingmode="auto"
strategy="beforeInteractive"
/>
</>
)}
<Providers latestBlogPost={latestBlogPost}>{children}</Providers>
{process.env.NEXT_PUBLIC_COOKIEBOT_CBID &&
process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID && (
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID} />
)}
</body>
</html>
);
Expand Down
1 change: 0 additions & 1 deletion website/build/tsconfig.tsbuildinfo

This file was deleted.

1 change: 0 additions & 1 deletion website/lib/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export function Providers({ children, latestBlogPost }: ProvidersProps) {
common: {
searchQuery: "",
showAside: false,
showPromo: false,
showTOC: false,
yScrollPosition: 0,
articleViewportHeight: "94vh",
Expand Down
3 changes: 0 additions & 3 deletions website/src/components/layout/site/site-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FC, ReactElement, ReactNode, useLayoutEffect, useRef } from "react";

import { CookieConsent, Promo } from "@/components/misc";
import { GlobalStyle } from "@/style";
import { Main } from "./main";

Expand All @@ -14,8 +13,6 @@ export const SiteLayout: FC<SiteLayoutProps> = ({ children, disableStars }) => {
<>
<GlobalStyle />
<Main>{children}</Main>
<CookieConsent />
<Promo />
{!disableStars && <Stars />}
</>
);
Expand Down
75 changes: 0 additions & 75 deletions website/src/components/misc/cookie-consent.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions website/src/components/misc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export * from "./button";
export * from "./cards";
export * from "./close";
export * from "./content-section";
export * from "./cookie-consent";
export * from "./feature-matrix";
export * from "./hero-elements";
export * from "./icon-container";
Expand All @@ -12,7 +11,6 @@ export * from "./optimized-image";
export * from "./page-top";
export * from "./pagination";
export * from "./plan";
export * from "./promo";
export * from "./search-modal";
export * from "./seo";
export * from "./spinner";
Expand Down
127 changes: 0 additions & 127 deletions website/src/components/misc/promo.tsx

This file was deleted.

4 changes: 0 additions & 4 deletions website/src/state/common/common.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ export const closeAside = createAction("[Common] Close aside pane");

export const closeTOC = createAction("[Common] Close table of contents pane");

export const showPromo = createAction("[Common] Show promo message");

export const hidePromo = createAction("[Common] Hide promo message");

export const toggleAside = createAction("[Common] Toggle aside pane");

export const toggleTOC = createAction("[Common] Toggle table of contents pane");
Expand Down
12 changes: 0 additions & 12 deletions website/src/state/common/common.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import {
closeAside,
closeTOC,
hasScrolled,
hidePromo,
setArticleHeight,
showPromo,
toggleAside,
toggleTOC,
} from "./common.actions";
Expand All @@ -32,16 +30,6 @@ export const commonReducer = createReducer<CommonState>(
showTOC: false,
})),

onAction(showPromo, (state) => ({
...state,
showPromo: true,
})),

onAction(hidePromo, (state) => ({
...state,
showPromo: false,
})),

onAction(toggleAside, (state) => ({
...state,
showAside: !state.showAside,
Expand Down
2 changes: 0 additions & 2 deletions website/src/state/common/common.state.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export interface CommonState {
readonly searchQuery: string;
readonly showAside: boolean;
readonly showPromo: boolean;
readonly showTOC: boolean;
readonly yScrollPosition: number;
readonly articleViewportHeight: string;
Comment thread
michaelstaib marked this conversation as resolved.
Resolved
Expand All @@ -10,7 +9,6 @@ export interface CommonState {
export const initialState: CommonState = {
searchQuery: "",
showAside: false,
showPromo: false,
showTOC: false,
yScrollPosition: 0,
articleViewportHeight: "94vh",
Expand Down
Loading