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.

Open
#747 0 comments 1 reaction 2 assignees Claimed by @BenjaminMichaelis View on GitHub
Dominant language
HTML
Stars
8
Forks
8
Avg merge
17h 23m
Merged PRs (30d)
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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.