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.

オープン
#747 コメント 0 件 リアクション 1 件 担当者 2 名 @BenjaminMichaelis が担当を希望しています GitHub で見る
主要言語
HTML
スター
8
フォーク
8
平均マージ
17時間 23分
マージ済み PR(30日)
61

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。