We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c89c92 commit a10620fCopy full SHA for a10620f
src/shared/const/headerValues.ts
@@ -2,13 +2,10 @@ const matchesSegment = (pathname: string, prefix: string): boolean => {
2
return pathname === prefix || pathname.startsWith(prefix + "/");
3
};
4
5
+const HIDDEN_PREFIXES = ["/signin", "/signup", "/vote", "/admin"];
6
+
7
export const isHiddenPath = (pathname: string): boolean => {
- return (
- matchesSegment(pathname, "/signin") ||
8
- matchesSegment(pathname, "/signup") ||
9
- matchesSegment(pathname, "/vote") ||
10
- matchesSegment(pathname, "/admin")
11
- );
+ return HIDDEN_PREFIXES.some(prefix => matchesSegment(pathname, prefix));
12
13
14
export const links = [
0 commit comments