Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
make getProPlanId work with vite
Brendan Alland8bd14e624c0
diff --git a/.env.example b/.env.exampleindex c2253bfe8..8fdb5fe45 100644--- a/.env.example+++ b/.env.example@@ -18,10 +18,12 @@NEXT_PUBLIC_ENVIRONMENT=developmentNEXT_PUBLIC_URL=http://localhost:3000NEXT_PUBLIC_PORT=3000+NEXT_PUBLIC_TASKS_URL=http://localhost:3002+NEXT_PUBLIC_URL=http://localhost:${NEXT_PUBLIC_PORT}NEXTAUTH_URL=${NEXT_PUBLIC_URL}VITE_SERVER_URL=${NEXT_PUBLIC_URL}-NEXT_PUBLIC_TASKS_URL=http://localhost:3002+VITE_ENVIRONMENT=${NEXT_PUBLIC_ENVIRONMENT}# IMPORTANT FOR LOCAL DEV:# This determines whether or not the app will run in "local mode".diff --git a/packages/utils/src/constants/plans.ts b/packages/utils/src/constants/plans.tsindex f752f47c8..9f0a4eee1 100644--- a/packages/utils/src/constants/plans.ts+++ b/packages/utils/src/constants/plans.ts@@ -10,10 +10,9 @@ const planIds = {};export const getProPlanId = (billingCycle: "yearly" | "monthly") => {- const environment =- process.env.NEXT_PUBLIC_ENVIRONMENT === "development"- ? "development"- : "production";+ const value =+ import.meta.env.VITE_ENVIRONMENT ?? process.env.NEXT_PUBLIC_ENVIRONMENT;+ const environment = value === "development" ? "development" : "production";return planIds[environment]?.[billingCycle] || "";};@@ -30,7 +29,7 @@ export const isUserOnProPlan = ({subscriptionStatus === "paid") {return true;- } else {- return false;}++ return false;};