Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update [domain].tsx

Steven Teya0c58ed6fe42
diff --git a/pages/_root/[domain].tsx b/pages/_root/[domain].tsx
index 461b44484a..dd3a41726e 100644
--- a/pages/_root/[domain].tsx
+++ b/pages/_root/[domain].tsx
@@ -89,7 +89,7 @@ export default function Placeholder({ domain }: { domain: string }) {
}
export const getStaticPaths = async () => {
- const domains = await prisma.domain.findMany({
+ const domains = process.env.VERCEL_ENV !== "production" ? await prisma.domain.findMany({
where: {
verified: true,
target: null,
@@ -97,7 +97,8 @@ export const getStaticPaths = async () => {
select: {
slug: true,
},
- });
+ }) : []
+
return {
paths: domains.map(({ slug: domain }) => ({
params: {