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.

Ouverte
#747 0 commentaires 1 réaction 2 personnes assignées Réclamée par @BenjaminMichaelis Voir sur GitHub
Langage dominant
HTML
Étoiles
8
Forks
8
Merge moyen
17 h 23 min
PR mergées (30 j)
61

Description

[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_

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.