Drawer
diff --git a/apps/prs/react/src/routes/features/feat2885.tsx b/apps/prs/react/src/routes/features/feat2885.tsx
index bed09d78b3..c5863f9a5b 100644
--- a/apps/prs/react/src/routes/features/feat2885.tsx
+++ b/apps/prs/react/src/routes/features/feat2885.tsx
@@ -1,4 +1,4 @@
-import { useState, useEffect } from "react";
+import { useState } from "react";
import {
GoabIconButton,
GoabWorkSideMenu,
@@ -7,9 +7,6 @@ import {
GoabWorkSideNotificationPanel,
} from "@abgov/react-components";
-// ?url suffix tells Vite to resolve the path without injecting the CSS
-import v2TokensUrl from "@abgov/design-tokens-v2/dist/tokens.css?url";
-
type Notification = {
id: string;
title: string;
@@ -23,18 +20,6 @@ type Notification = {
export function Feat2885Route() {
const [menuOpen, setMenuOpen] = useState(true);
- // Dynamically load v2 design tokens only while this page is mounted,
- // so they don't leak into other routes in the SPA.
- useEffect(() => {
- const link = document.createElement("link");
- link.rel = "stylesheet";
- link.href = v2TokensUrl;
- document.head.appendChild(link);
- return () => {
- document.head.removeChild(link);
- };
- }, []);
-
// Helper to get date at specific days ago
const daysAgo = (days: number, hours = 0) => {
const date = new Date();
diff --git a/apps/prs/react/src/routes/features/feat3229.tsx b/apps/prs/react/src/routes/features/feat3229.tsx
index a84e8c5285..3d380f26f9 100644
--- a/apps/prs/react/src/routes/features/feat3229.tsx
+++ b/apps/prs/react/src/routes/features/feat3229.tsx
@@ -1,4 +1,4 @@
-import { useState, useEffect } from "react";
+import { useState } from "react";
import {
GoabBadge,
GoabBlock,
@@ -9,7 +9,6 @@ import {
} from "@abgov/react-components";
import { GoabMenuButtonOnActionDetail } from "@abgov/ui-components-common";
-import v2TokensUrl from "@abgov/design-tokens-v2/dist/tokens.css?url";
// Menu actions with icon + text
const menuActionsWithIcons = (
@@ -34,49 +33,6 @@ const menuActionsTextOnly = (
export function Feat3229Route() {
const [lastAction, setLastAction] = useState
("");
- useEffect(() => {
- // Load V2 tokens
- const link = document.createElement("link");
- link.rel = "stylesheet";
- link.href = v2TokensUrl;
- document.head.appendChild(link);
-
- // Save deleted rules so we can restore them on cleanup
- const deletedRules: Array<{ sheet: CSSStyleSheet; index: number; cssText: string }> =
- [];
-
- // Remove V1 token definitions (:root rules) from all other stylesheets,
- // keeping component styles intact
- link.onload = () => {
- [...document.styleSheets].forEach((ss) => {
- if (ss.ownerNode === link) return; // skip V2 stylesheet
- try {
- for (let i = ss.cssRules.length - 1; i >= 0; i--) {
- const rule = ss.cssRules[i];
- if (rule instanceof CSSStyleRule && rule.selectorText === ":root") {
- deletedRules.push({ sheet: ss, index: i, cssText: rule.cssText });
- ss.deleteRule(i);
- }
- }
- } catch (e) {
- // skip cross-origin sheets
- }
- });
- };
-
- return () => {
- document.head.removeChild(link);
- // Restore V1 :root rules in reverse order to maintain correct indices
- deletedRules.reverse().forEach(({ sheet, index, cssText }) => {
- try {
- sheet.insertRule(cssText, index);
- } catch (e) {
- console.log(e);
- }
- });
- };
- }, []);
-
const handleAction = (detail: GoabMenuButtonOnActionDetail, label?: string) => {
const source = label ? ` (${label})` : "";
setLastAction(`Action "${detail.action}"${source}`);
diff --git a/apps/prs/react/src/routes/features/feat3344.tsx b/apps/prs/react/src/routes/features/feat3344.tsx
index c39cd44f37..f75a9e7062 100644
--- a/apps/prs/react/src/routes/features/feat3344.tsx
+++ b/apps/prs/react/src/routes/features/feat3344.tsx
@@ -9,7 +9,7 @@
* - V2 focus ring on icon only (not whole button)
*/
-import { useEffect, useMemo, useState } from "react";
+import { useMemo, useState } from "react";
import {
GoabBlock,
GoabDetails,
@@ -17,8 +17,6 @@ import {
GoabTable,
GoabTableSortHeader,
} from "@abgov/react-components";
-// ?url suffix tells Vite to resolve the path without injecting the CSS
-import v2TokensUrl from "@abgov/design-tokens-v2/dist/tokens.css?url";
import type { GoabTableSortEntry } from "@abgov/ui-components-common";
@@ -51,16 +49,6 @@ function sortData(data: RowData[], sorts: GoabTableSortEntry[]): RowData[] {
}
export function Feat3344Route() {
- useEffect(() => {
- const link = document.createElement("link");
- link.rel = "stylesheet";
- link.href = v2TokensUrl;
- document.head.appendChild(link);
- return () => {
- document.head.removeChild(link);
- };
- }, []);
-
const [currentSorts, setCurrentSorts] = useState([]);
const [multiSorts, setMultiSorts] = useState([]);
const [test3Sorts, setTest3Sorts] = useState([]);
diff --git a/apps/prs/react/src/routes/features/feat3407StackOnMobile.tsx b/apps/prs/react/src/routes/features/feat3407StackOnMobile.tsx
index 7065463bcd..004b6c821c 100644
--- a/apps/prs/react/src/routes/features/feat3407StackOnMobile.tsx
+++ b/apps/prs/react/src/routes/features/feat3407StackOnMobile.tsx
@@ -6,23 +6,9 @@ import {
GoabText,
} from "@abgov/react-components";
-import { useEffect, type JSX } from "react";
-// ?url suffix tells Vite to resolve the path without injecting the CSS
-import v2TokensUrl from "@abgov/design-tokens-v2/dist/tokens.css?url";
+import { type JSX } from "react";
export function Feat3407StackOnMobileRoute(): JSX.Element {
- // Dynamically load v2 design tokens only while this page is mounted,
- // so they don't leak into other routes in the SPA.
- useEffect(() => {
- const link = document.createElement("link");
- link.rel = "stylesheet";
- link.href = v2TokensUrl;
- document.head.appendChild(link);
- return () => {
- document.head.removeChild(link);
- };
- }, []);
-
return (