diff --git a/components/CardsLanding.tsx b/components/CardsLanding.tsx index d760736..26f772e 100644 --- a/components/CardsLanding.tsx +++ b/components/CardsLanding.tsx @@ -20,7 +20,7 @@ const CardsLanding = (): JSX.Element => ( { yearly ? Prices.personal.annually.id : Prices.personal.monthly.id ) : () => { - router.push('/auth'); + router.push('/signup'); } } > @@ -224,7 +224,7 @@ const Pricing = (): JSX.Element => { : (e) => handleSubmit(e, yearly ? Prices.team.annually.id : Prices.team.monthly.id) : () => { - router.push('/auth'); + router.push('/signup'); } } > @@ -268,7 +268,7 @@ const Pricing = (): JSX.Element => { : (e) => handleSubmit(e, yearly ? Prices.pro.annually.id : Prices.pro.monthly.id) : () => { - router.push('/auth'); + router.push('/signup'); } } > diff --git a/components/UI/SignUpPanel.tsx b/components/UI/SignUpPanel.tsx index c8fb94f..28cac47 100644 --- a/components/UI/SignUpPanel.tsx +++ b/components/UI/SignUpPanel.tsx @@ -20,11 +20,14 @@ const SignUpPanel = ({ signIn, signUp }: SignUpPanelProps): JSX.Element => { email, password, }).then((result) => { - if (result.data) { - router.push('/'); - } + console.log(result); if (result.error) { toast.error(result.error.message); + } else if (result.data?.confirmation_sent_at) { + console.log(result.data.confirmation_sent_at); + toast.success('A confirmation email has been sent to you, watch your mailbox!'); + } else if (result.data) { + router.push('/'); } }); }; diff --git a/cypress.json b/cypress.json deleted file mode 100644 index 0db2347..0000000 --- a/cypress.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "baseUrl": "http://localhost:3000", - "viewportWidth": 1280, - "viewportHeight": 800 -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 77370f3..954fd67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "@headlessui/react": "^1.4.1", "@sendgrid/mail": "^7.4.7", "@stripe/stripe-js": "^1.18.0", - "@supabase/supabase-js": "^1.23.0", + "@supabase/supabase-js": "^1.25.0", "@types/node": "^16.10.1", "@types/react": "^17.0.24", "@types/react-dom": "^17.0.9", @@ -1575,13 +1575,13 @@ } }, "node_modules/@supabase/supabase-js": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.24.0.tgz", - "integrity": "sha512-/gM9+mSqmftHF8pzWzb+etQOvVSLT1cDrlvIL6LZSNrlv+ZRij8QAXnX9JGiUh0lNq046ZtrJThxys01P2TJSA==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.25.0.tgz", + "integrity": "sha512-r+f9CyzK2GfP6tbblwLklxienJQod+y/HKoDKLFYgQlS9J2ITVgNyBjOQOtiOgD6vibGiXZZKSZl8sWrfzVVkg==", "dependencies": { "@supabase/gotrue-js": "^1.18.0", "@supabase/postgrest-js": "^0.34.0", - "@supabase/realtime-js": "^1.1.3", + "@supabase/realtime-js": "^1.2.0", "@supabase/storage-js": "^1.4.0" } }, @@ -9457,13 +9457,13 @@ } }, "@supabase/supabase-js": { - "version": "1.24.0", - "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.24.0.tgz", - "integrity": "sha512-/gM9+mSqmftHF8pzWzb+etQOvVSLT1cDrlvIL6LZSNrlv+ZRij8QAXnX9JGiUh0lNq046ZtrJThxys01P2TJSA==", + "version": "1.25.0", + "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-1.25.0.tgz", + "integrity": "sha512-r+f9CyzK2GfP6tbblwLklxienJQod+y/HKoDKLFYgQlS9J2ITVgNyBjOQOtiOgD6vibGiXZZKSZl8sWrfzVVkg==", "requires": { "@supabase/gotrue-js": "^1.18.0", "@supabase/postgrest-js": "^0.34.0", - "@supabase/realtime-js": "^1.1.3", + "@supabase/realtime-js": "^1.2.0", "@supabase/storage-js": "^1.4.0" } }, diff --git a/package.json b/package.json index cf495b6..e3ee476 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,6 @@ "dev": "next dev", "build": "next build", "start": "next start", - "cypress:open": "cypress open", - "cypress:run": "cypress run", "eslint": "eslint . --fix", "test": "playwright test" }, @@ -15,7 +13,7 @@ "@headlessui/react": "^1.4.1", "@sendgrid/mail": "^7.4.7", "@stripe/stripe-js": "^1.18.0", - "@supabase/supabase-js": "^1.23.0", + "@supabase/supabase-js": "^1.25.0", "@types/node": "^16.10.1", "@types/react": "^17.0.24", "@types/react-dom": "^17.0.9", diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index deabfb5..12aec2d 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -104,7 +104,7 @@ export async function getServerSideProps(context: NextPageContext) { plan: subscription?.items.data[0].price.id ? subscription?.items.data[0].price.id : null, profile, // Retrieve the name of the subscription plan (Don't forget to add nickname to your prices) - planName: plan.paid_user + planName: plan?.paid_user ? subscription?.items.data[0].plan.nickname ? subscription?.items.data[0].plan.nickname : '[DEV] Please add a description for your prices' diff --git a/tests/basic.spec.ts b/tests/basic.spec.ts index f3d1c46..b06ffb4 100644 --- a/tests/basic.spec.ts +++ b/tests/basic.spec.ts @@ -1,4 +1,4 @@ -import { expect, test } from '@playwright/test'; +import { test } from '@playwright/test'; test('basic test', async ({ page }) => { const myURL: string = process.env.PLAYWRIGHT_TEST_BASE_URL