export const isPathBanned = ( currentPath: string, bannedPaths: string[] = [] ): boolean => { if (!bannedPaths || bannedPaths.length === 0) { return false; } const normalizedPath = currentPath.replace(/^\/+/, "").toLowerCase(); return bannedPaths.some((bannedPath) => { const normalizedBannedPath = bannedPath.replace(/^\/+/, "").toLowerCase(); return normalizedPath.includes(normalizedBannedPath); }); }; export const getCurrentPath = (): string => { if (typeof window === "undefined") { return ""; } return window.location.href; };