refactor(admin): remove sidebar favorites
This commit is contained in:
1 parent
a070004e7b
commit
96234075f8
7 files changed
+1
-152
No files matched your search
@@ -159,22 +159,3 @@ export function visibleAdminNavigation(
|
||||
});
|
||||
return organized;
|
||||
}
|
||||
|
||||
export function parseFavoritePages(raw: string | null): string[] {
|
||||
try {
|
||||
const value: unknown = JSON.parse(raw ?? "[]");
|
||||
return Array.isArray(value)
|
||||
? [
|
||||
...new Set(
|
||||
value.filter(
|
||||
(entry): entry is string =>
|
||||
typeof entry === "string" &&
|
||||
/^\/admin(?:\/[^?#]*)?$/.test(entry),
|
||||
),
|
||||
),
|
||||
].slice(0, 6)
|
||||
: [];
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user