IntelliTect / IntelliTect/EssentialCSharp.Web

The hard-coded list of routes in `isContentPage` may become brittle; consider extracting the paths into a constant or config and using `Array.includes` for clarity and easier updates.

Offen
#747 0 Kommentare 1 Reaktion 2 zugewiesene Personen Beansprucht von @BenjaminMichaelis Auf GitHub ansehen
Vorherrschende Sprache
HTML
Sterne
8
Forks
8
Ø Merge
17 Std. 23 Min.
Gemergte PRs (30 T.)
61

Beschreibung

[nitpick] The hard-coded list of routes in `isContentPage` may become brittle; consider extracting the paths into a constant or config and using `Array.includes` for clarity and easier updates.
```suggestion
const NON_CONTENT_ROUTES = ['/home', '/guidelines', '/about', '/announcements'];
const isContentPage = computed(() => {
let path = window.location.pathname;
return !NON_CONTENT_ROUTES.includes(path);
});
```

_Originally posted by @Copilot in https://github.com/IntelliTect/EssentialCSharp.Web/pull/667#discussion_r2198566942_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.