Remove coming-soon; redirect site hosts to website app.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-09-07 21:00:23 +03:30
co-authored by Cursor
parent 18b29f5b62
commit 1041ab20c5
7 changed files with 18 additions and 237 deletions
+4 -14
View File
@@ -4,12 +4,7 @@ import { useEffect } from "react";
import { usePathname, useRouter } from "next/navigation";
import { useAuth } from "@/lib/auth";
const PUBLIC_PATHS = ["/login", "/coming-soon"];
const WEBSITE_HOSTS = new Set([
"mana-collection.com",
"www.mana-collection.com",
]);
const PUBLIC_PATHS = ["/login"];
export default function RequireStoreAuth({
children,
@@ -20,14 +15,9 @@ export default function RequireStoreAuth({
const pathname = usePathname();
const router = useRouter();
const host =
typeof window !== "undefined"
? window.location.hostname.toLowerCase()
: "";
const onWebsite = WEBSITE_HOSTS.has(host);
const isPublic =
onWebsite ||
PUBLIC_PATHS.some((p) => pathname === p || pathname.startsWith(`${p}/`));
const isPublic = PUBLIC_PATHS.some(
(p) => pathname === p || pathname.startsWith(`${p}/`),
);
useEffect(() => {
if (loading || isPublic) return;