From 32164c8b9edb5cec2299f626084dc3dd4f17c7b2 Mon Sep 17 00:00:00 2001 From: Bruno Bernardino Date: Wed, 5 Jan 2022 09:57:49 +0000 Subject: [PATCH] Implement billing control --- .eslintrc.js | 1 + components/Layout/Footer.tsx | 38 ++++--- components/Layout/Header.module.scss | 2 +- components/Layout/Main.tsx | 4 +- components/Panels/Billing.tsx | 156 +++++++++++++++++++++++++++ components/Panels/Login.tsx | 20 +++- components/Panels/Pricing.tsx | 117 ++++++++++++++++++++ lib/constants.ts | 7 +- lib/utils.ts | 11 ++ next.config.js | 2 +- pages/_document.tsx | 1 + pages/billing.tsx | 64 +++++++++++ pages/index.tsx | 5 + pages/pricing.tsx | 63 +++++++++++ styles/_common.scss | 2 +- 15 files changed, 469 insertions(+), 24 deletions(-) create mode 100644 components/Panels/Billing.tsx create mode 100644 components/Panels/Pricing.tsx create mode 100644 pages/billing.tsx create mode 100644 pages/pricing.tsx diff --git a/.eslintrc.js b/.eslintrc.js index dfc7bd0..b4a7851 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -71,6 +71,7 @@ const eslint = { 'react/jsx-curly-newline': 'off', 'react/function-component-definition': 'off', 'react/jsx-no-useless-fragment': 'off', + 'no-nested-ternary': 'off', }, parserOptions: { ecmaFeatures: { diff --git a/components/Layout/Footer.tsx b/components/Layout/Footer.tsx index 32e16a9..59c9345 100644 --- a/components/Layout/Footer.tsx +++ b/components/Layout/Footer.tsx @@ -1,6 +1,8 @@ +import Link from 'next/link'; + import styles from './Footer.module.scss'; -const Footer = () => { +const Footer = ({ hasValidSession }: { hasValidSession: boolean }) => { return (