Skip to content

Commit 3736af3

Browse files
committed
fix
1 parent a59d007 commit 3736af3

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.changeset/dev-only-playground.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"dopeshot-app": patch
3+
---
4+
5+
Hide the playground route outside development builds

apps/app/src/app/page.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import { notFound } from "next/navigation";
12
import { PlaygroundPage } from "@/app/(playground)/_components/playground-page";
23
import { verifySession } from "@/lib/auth/session";
34
import { getUserDb } from "@/lib/data/dal";
45
import { getUserTier } from "@/lib/tier";
56
import { isBrandPersonality } from "@/lib/types/brand";
67

8+
const isPlaygroundEnabled = process.env.NODE_ENV !== "production";
9+
710
const BRAND_ONBOARDING_STEP = "brand_profile";
811

912
function looksCompleteFromProfile(profile: {
@@ -22,6 +25,10 @@ function looksCompleteFromProfile(profile: {
2225
}
2326

2427
export default async function Page() {
28+
if (!isPlaygroundEnabled) {
29+
notFound();
30+
}
31+
2532
const session = await verifySession();
2633

2734
if (session.isAuth && session.userId) {

0 commit comments

Comments
 (0)