🐛 fix: Add the VITE_SHOW_LANDING_PAGE configuration to control the landing page display logic.

This commit is contained in:
web
2025-12-16 07:03:13 -08:00
parent 76481755ea
commit a8a3d18061
4 changed files with 22 additions and 1 deletions
+10 -1
View File
@@ -10,11 +10,20 @@ export default function Main() {
const { user } = useGlobalStore();
const navigate = useNavigate();
const showLanding = import.meta.env.VITE_SHOW_LANDING_PAGE !== "false";
useEffect(() => {
if (user) {
navigate({ to: "/dashboard" });
return;
}
}, [user, navigate]);
if (!showLanding) {
navigate({ to: "/auth" });
}
}, [user, navigate, showLanding]);
if (!showLanding) return null;
return (
<main className="container space-y-16">