Skip to content

Commit a4a68c4

Browse files
committed
Removing use of base alias from lib folder + adding back Checkbox component
1 parent b6aa507 commit a4a68c4

File tree

7 files changed

+1315
-15
lines changed

7 files changed

+1315
-15
lines changed

src/lib/components/layout/service-navigation-nested-mobile/HeaderNav.svelte

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<script lang="ts">
2-
import { base } from "$app/paths";
3-
42
import { onMount } from "svelte";
53
64
// Define navigation item type

src/lib/components/ui/CookieBanner.svelte

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts">
2-
import { base } from "$app/paths";
32
import { onMount } from "svelte";
43
import { browser } from "$app/environment";
54
import { page } from "$app/state";
@@ -260,11 +259,7 @@
260259
/>
261260

262261
{#snippet settingsLink()}
263-
<a
264-
href={base + cookiesUrl}
265-
class="govuk-link"
266-
onclick={handleCookiesNavigation}
267-
>
262+
<a href={cookiesUrl} class="govuk-link" onclick={handleCookiesNavigation}>
268263
{changeSettingsText}
269264
</a>
270265
{/snippet}
@@ -338,7 +333,7 @@
338333
{rejectButtonText}
339334
</button>
340335
<a
341-
href={base + cookiesUrl}
336+
href={cookiesUrl}
342337
class="govuk-link"
343338
onclick={handleCookiesNavigation}
344339
>

src/lib/package-wrapping/BaseNameAndStatus.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script lang="ts">
2-
import { base } from "$app/paths";
32
import Pill from "$lib/package-wrapping/Pill.svelte";
43
import {
54
pascalToKebabCase,
@@ -21,7 +20,7 @@
2120
<!-- Homepage: component name as clickable link -->
2221
<a
2322
class="link-to-other-page"
24-
href={`${base}/${parentFolder}${(folder ? "/" + folder : "") + (subFolder ? "/" + subFolder : "")}/${pascalToKebabCase(name)}`}
23+
href={`/${parentFolder}${(folder ? "/" + folder : "") + (subFolder ? "/" + subFolder : "")}/${pascalToKebabCase(name)}`}
2524
>
2625
<h6>{@html forceWrapAtThirdCapital(name)}</h6>
2726
</a>

src/lib/utils/layoutNavHelpers.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { base } from "$app/paths";
21
import type {
32
SideNavItem,
43
SideNavGroup,
5-
} from "$lib/components/layout/service-navigation-nested-mobile/SideNav.svelte";
4+
} from "../components/layout/service-navigation-nested-mobile/SideNav.svelte";
65
import type { ComponentItem } from "../../routes/+layout.server"; // Adjust path as needed if +layout.server.ts is the source
76
import { forceWrapAtThirdCapital } from "./text-string-conversion/textStringConversion.js";
87

@@ -30,7 +29,7 @@ export function extractLinkableComponentNavItems(
3029
// If it's a wrapper, add it directly
3130
navItems.push({
3231
text: forceWrapAtThirdCapital(item.name),
33-
href: `${base}/${item.path}`,
32+
href: `/${item.path}`,
3433
// subItems: undefined, // Explicitly no sub-items for direct wrappers here
3534
});
3635
}
@@ -67,7 +66,7 @@ export function createMobileItems(tree: ComponentItem[]) {
6766
if (category.hasWrapper) {
6867
result.push({
6968
text: forceWrapAtThirdCapital(category.name),
70-
href: `${base}/${category.path}`,
69+
href: `/${category.path}`,
7170
});
7271
}
7372
// If the category has children, process them

0 commit comments

Comments
 (0)