chore: Move link actions to their own module and inline link checks

This commit is contained in:
Tom Moor committed 2026-11-11 21:18:44 -05:00
1 parent 080a9e59c8
commit fb7b024489
23 files changed
+226 -223

No files matched your search

+2 -3
View File
@@ -1,6 +1,5 @@
import { escape } from "es-toolkit/compat";
import type { NavigationNode } from "@shared/types";
import { isLinkNode } from "@shared/utils/collections";
import { NavigationNodeType, type NavigationNode } from "@shared/types";
/**
* Converts a navigation tree to a sitemap XML string, by traversing the nodes.
@@ -17,7 +16,7 @@ export function navigationNodeToSitemap(
function collectUrls(node: NavigationNode, urls: string[]) {
// Links point to other pages, which are not part of the share.
if (isLinkNode(node)) {
if (node.type === NavigationNodeType.Link) {
return;
}
urls.push(`${baseUrl}${node.url}`);