23/10
This commit is contained in:
parent
e4195a91f5
commit
d4818ee461
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
function layout({ children }: { children: React.ReactNode }) {
|
function layout({ children }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{children}
|
{children}
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import PageHeader from "@/sections/PageHeader"
|
import PageHeader from "@/sections/PageHeader"
|
||||||
|
import Payment from "@/sections/Payment"
|
||||||
import Newsletter from "@/sections/Newsletter/Newsletter"
|
import Newsletter from "@/sections/Newsletter/Newsletter"
|
||||||
import Background from "@/components/Utilities/Background"
|
import Background from "@/components/Utilities/Background"
|
||||||
import Footer from "@/components/Footer"
|
import Footer from "@/components/Footer"
|
||||||
import Payment from "@/sections/Payment"
|
|
||||||
import Spacer from "@/components/Utilities/Spacer"
|
import Spacer from "@/components/Utilities/Spacer"
|
||||||
import SolidBackgrondIconFeature from "@/sections/Features/SolidBackgrondIconFeature"
|
import SolidBackgrondIconFeature from "@/sections/Features/SolidBackgrondIconFeature"
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ export default function PricingPage() {
|
||||||
|
|
||||||
<Payment type="one_time" />
|
<Payment type="one_time" />
|
||||||
<Spacer className="mt-auto" />
|
<Spacer className="mt-auto" />
|
||||||
<Newsletter />
|
<Newsletter/>
|
||||||
<Spacer className="mb-8" />
|
<Spacer className="mb-8" />
|
||||||
<Footer />
|
<Footer />
|
||||||
</Background>
|
</Background>
|
||||||
|
|
|
@ -4,7 +4,6 @@ import "../app/globals.css"
|
||||||
import { Arimo, Indie_Flower } from "next/font/google"
|
import { Arimo, Indie_Flower } from "next/font/google"
|
||||||
import { ToastContainer } from "react-toastify"
|
import { ToastContainer } from "react-toastify"
|
||||||
import "react-toastify/dist/ReactToastify.css"
|
import "react-toastify/dist/ReactToastify.css"
|
||||||
import Header from "@/components/Header"
|
|
||||||
import { cookies } from "next/headers"
|
import { cookies } from "next/headers"
|
||||||
import { isAuthenticated } from "@/lib/auth"
|
import { isAuthenticated } from "@/lib/auth"
|
||||||
import { GTagProvider, PHProvider, ThemeProvider } from "./providers"
|
import { GTagProvider, PHProvider, ThemeProvider } from "./providers"
|
||||||
|
|
|
@ -7,7 +7,6 @@ import PageHeader from "@/sections/PageHeader"
|
||||||
import ContainerImageIconBlocksFeature from "@/sections/Features/ContainerImageIconBlocksFeature"
|
import ContainerImageIconBlocksFeature from "@/sections/Features/ContainerImageIconBlocksFeature"
|
||||||
import Background from "@/components/Utilities/Background"
|
import Background from "@/components/Utilities/Background"
|
||||||
import CardTestemonial from "@/sections/Testemonial/CardTestemonial"
|
import CardTestemonial from "@/sections/Testemonial/CardTestemonial"
|
||||||
import Payment from "@/sections/Payment"
|
|
||||||
import CardsFeature from "@/sections/Features/CardsFeature"
|
import CardsFeature from "@/sections/Features/CardsFeature"
|
||||||
import FAQ from "@/sections/FAQ/RightAlignedBorderBottomFAQ"
|
import FAQ from "@/sections/FAQ/RightAlignedBorderBottomFAQ"
|
||||||
import VerticalTabsFeature from "@/sections/Features/VerticalTabsFeature"
|
import VerticalTabsFeature from "@/sections/Features/VerticalTabsFeature"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"use client";
|
"use client";
|
||||||
import posthog from 'posthog-js'
|
import posthog from 'posthog-js'
|
||||||
import { PostHogProvider } from 'posthog-js/react'
|
import { PostHogProvider } from 'posthog-js/react'
|
||||||
import GoogleAnalytics from "@/components/GoogleAnalytics";
|
|
||||||
import { ThemeProvider as NTThemeProvider } from 'next-themes'
|
import { ThemeProvider as NTThemeProvider } from 'next-themes'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
function Page() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
Qualquercoisa
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Page;
|
|
@ -0,0 +1,147 @@
|
||||||
|
"use client"
|
||||||
|
|
||||||
|
import React from "react"
|
||||||
|
import { useForm } from "react-hook-form"
|
||||||
|
import { yupResolver } from "@hookform/resolvers/yup"
|
||||||
|
import { signInValidationSchema } from "@/utils/form"
|
||||||
|
import { login } from "@/app/actions"
|
||||||
|
import { toast } from "react-toastify"
|
||||||
|
import { useRouter } from "next/navigation"
|
||||||
|
import { Dismiss20Filled } from "@fluentui/react-icons"
|
||||||
|
|
||||||
|
function ModalSignIn() {
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
|
const {
|
||||||
|
register,
|
||||||
|
handleSubmit,
|
||||||
|
reset,
|
||||||
|
formState: { errors, isSubmitting }
|
||||||
|
} = useForm({
|
||||||
|
resolver: yupResolver(signInValidationSchema)
|
||||||
|
})
|
||||||
|
|
||||||
|
const onSubmit = async data => {
|
||||||
|
try {
|
||||||
|
//login user
|
||||||
|
const auth = await login({ email: data.email, password: data.password })
|
||||||
|
if (auth.success) {
|
||||||
|
reset()
|
||||||
|
document.getElementById("sign-in-modal")?.click()
|
||||||
|
router.push("/account")
|
||||||
|
} else {
|
||||||
|
throw new Error(auth.response.message)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
if (error instanceof Error) {
|
||||||
|
toast.error(error.message, {
|
||||||
|
position: "bottom-left",
|
||||||
|
autoClose: 5000,
|
||||||
|
hideProgressBar: false,
|
||||||
|
closeOnClick: true,
|
||||||
|
pauseOnHover: true,
|
||||||
|
draggable: true,
|
||||||
|
progress: undefined,
|
||||||
|
theme: "colored"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="sign-in-modal"
|
||||||
|
className="modal-toggle"
|
||||||
|
onClick={() => {
|
||||||
|
reset()
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<label htmlFor="sign-in-modal" className="modal cursor-pointer">
|
||||||
|
<label className="modal-box relative bg-base-100 max-w-full md:max-w-[550px] py-4 px-3 md:p-6">
|
||||||
|
<div className="flex justify-end pb-2 select-none">
|
||||||
|
<label
|
||||||
|
htmlFor="sign-in-modal"
|
||||||
|
className="cursor-pointer text-base-content"
|
||||||
|
>
|
||||||
|
<Dismiss20Filled />
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div className="w-[100%] bg-gradient-to-r from-primary to-secondary px-6 pt-2 mt-3 pb-6 rounded-lg text-primary-content">
|
||||||
|
<h3 className="pb-1 text-3xl font-bold md:text-3xl pt-6">
|
||||||
|
Welcome back!
|
||||||
|
</h3>
|
||||||
|
<p className="text-sm md:text-base">Lets kick some more ass?</p>
|
||||||
|
</div>
|
||||||
|
<form onSubmit={handleSubmit(onSubmit)} className="w-full">
|
||||||
|
<div className="relative mt-6">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-primary/40 rounded-lg text-sm focus:border-secondary focus:ring-secondary disabled:opacity-50 disabled:pointer-events-none "
|
||||||
|
placeholder="Your email…"
|
||||||
|
aria-label="Your email…"
|
||||||
|
autoComplete="on"
|
||||||
|
{...register("email")}
|
||||||
|
/>
|
||||||
|
<div className="text-start text-sm italic text-error-content">
|
||||||
|
{errors.email?.message}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="relative mt-1 mb-2 ">
|
||||||
|
<input
|
||||||
|
type="password"
|
||||||
|
className="py-3 px-4 block w-full bg-base-200 text-base-content border-primary/40 rounded-lg text-sm focus:border-secondary focus:ring-secondary disabled:opacity-50 disabled:pointer-events-none "
|
||||||
|
placeholder="Your password..."
|
||||||
|
aria-label="Your password..."
|
||||||
|
{...register("password")}
|
||||||
|
/>
|
||||||
|
<div className="text-start text-sm italic text-error-content">
|
||||||
|
{errors.password?.message}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex flex-row w-full justify-between">
|
||||||
|
<div className="flex flex-row gap-x-4">
|
||||||
|
<button
|
||||||
|
disabled={isSubmitting}
|
||||||
|
type="submit"
|
||||||
|
className="btn btn-primary"
|
||||||
|
>
|
||||||
|
Sign In
|
||||||
|
{isSubmitting && <div className="loading"></div>}
|
||||||
|
</button>
|
||||||
|
<div className=" text-xs w-28 block">
|
||||||
|
<span className="whitespace-normal">
|
||||||
|
Dont have an account?{" "}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span
|
||||||
|
onClick={() => {
|
||||||
|
document.getElementById("sign-in-modal")?.click()
|
||||||
|
document.getElementById("sign-up-modal")?.click()
|
||||||
|
}}
|
||||||
|
className="text-primary hover:text-primary/60 cursor-pointer "
|
||||||
|
>
|
||||||
|
Sign up
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
onClick={() =>
|
||||||
|
document.getElementById("password-reset-modal")?.click()
|
||||||
|
}
|
||||||
|
className="btn btn-ghost text-primary capitalize border-none"
|
||||||
|
>
|
||||||
|
Reset Password
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</label>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ModalSignIn
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
"compilerOptions": {
|
|
||||||
"target": "es5",
|
|
||||||
"lib": [
|
|
||||||
"dom",
|
|
||||||
"dom.iterable",
|
|
||||||
"esnext"
|
|
||||||
],
|
|
||||||
"allowJs": true,
|
|
||||||
"noImplicitAny": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"strict": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"module": "esnext",
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"jsx": "preserve",
|
|
||||||
"incremental": true,
|
|
||||||
"plugins": [
|
|
||||||
{
|
|
||||||
"name": "next"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"paths": {
|
|
||||||
"@/*": [
|
|
||||||
"./*"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"forceConsistentCasingInFileNames": true
|
|
||||||
},
|
|
||||||
"include": [
|
|
||||||
"next-env.d.ts",
|
|
||||||
"**/*.ts",
|
|
||||||
"**/*.tsx",
|
|
||||||
".next/types/**/*.ts"
|
|
||||||
, "app/providers.js", "app/actions.js", "sections/Payment.jsx", "sections/AccountContent.jsx" ],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,257 +0,0 @@
|
||||||
export interface PostMetadata {
|
|
||||||
title: string;
|
|
||||||
date: string;
|
|
||||||
subtitle: string;
|
|
||||||
slug: string;
|
|
||||||
image: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SignUpForm = {
|
|
||||||
email: string;
|
|
||||||
password?: string;
|
|
||||||
passwordConfirmation: string;
|
|
||||||
first_name: string;
|
|
||||||
last_name: string;
|
|
||||||
phone_number?: string;
|
|
||||||
company_size: string;
|
|
||||||
organisation: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Product = {
|
|
||||||
product_id: string;
|
|
||||||
active: boolean;
|
|
||||||
name: string;
|
|
||||||
description: string;
|
|
||||||
image: string;
|
|
||||||
metadata: {
|
|
||||||
benefits: string[];
|
|
||||||
};
|
|
||||||
product_order: number;
|
|
||||||
yearlyPrice: Price;
|
|
||||||
monthlyPrice: Price;
|
|
||||||
type: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Price = {
|
|
||||||
id: string;
|
|
||||||
price_id: string;
|
|
||||||
product_id: string;
|
|
||||||
active: boolean;
|
|
||||||
description: string;
|
|
||||||
unit_amount: number;
|
|
||||||
currency: string;
|
|
||||||
type: string;
|
|
||||||
interval: string;
|
|
||||||
interval_count: number;
|
|
||||||
trial_period_day: number;
|
|
||||||
metadata: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type CheckoutSession = {
|
|
||||||
after_expiration: null | string,
|
|
||||||
allow_promotion_codes: boolean,
|
|
||||||
amount_subtotal: number,
|
|
||||||
amount_total: number,
|
|
||||||
automatic_tax: {
|
|
||||||
enabled: boolean,
|
|
||||||
status: string
|
|
||||||
},
|
|
||||||
billing_address_collection: string,
|
|
||||||
cancel_url: string,
|
|
||||||
client_reference_id: string,
|
|
||||||
consent: string,
|
|
||||||
consent_collection: string,
|
|
||||||
created: number,
|
|
||||||
currency: string,
|
|
||||||
currency_conversion: null | string,
|
|
||||||
customer: {
|
|
||||||
address: null | string,
|
|
||||||
balance: number,
|
|
||||||
cash_balance: null | string,
|
|
||||||
created: number,
|
|
||||||
currency: string,
|
|
||||||
default_source: null | string,
|
|
||||||
deleted: boolean,
|
|
||||||
delinquent: boolean,
|
|
||||||
description: string,
|
|
||||||
discount: null | string,
|
|
||||||
email: string,
|
|
||||||
id: string,
|
|
||||||
invoice_credit_balance: null | string,
|
|
||||||
invoice_prefix: string,
|
|
||||||
invoice_settings: null | string,
|
|
||||||
livemode: boolean,
|
|
||||||
metadata: null | string,
|
|
||||||
name: string,
|
|
||||||
next_invoice_sequence: number,
|
|
||||||
object: string,
|
|
||||||
phone: string,
|
|
||||||
preferred_locales: null | string,
|
|
||||||
shipping: null | string,
|
|
||||||
sources: null | string,
|
|
||||||
subscriptions: null | string,
|
|
||||||
tax: null | string,
|
|
||||||
tax_exempt: string,
|
|
||||||
tax_ids: null | string,
|
|
||||||
test_clock: null | string
|
|
||||||
},
|
|
||||||
customer_creation: string,
|
|
||||||
customer_details: {
|
|
||||||
address: null | string,
|
|
||||||
email: string,
|
|
||||||
name: string,
|
|
||||||
phone: string,
|
|
||||||
tax_exempt: string,
|
|
||||||
tax_ids: null | string
|
|
||||||
},
|
|
||||||
customer_email: string,
|
|
||||||
custom_fields: [],
|
|
||||||
custom_text: {
|
|
||||||
shipping_address: null | string,
|
|
||||||
submit: null | string
|
|
||||||
},
|
|
||||||
expires_at: number,
|
|
||||||
id: string,
|
|
||||||
invoice: null | string,
|
|
||||||
invoice_creation: null | string,
|
|
||||||
line_items: null | string,
|
|
||||||
livemode: boolean,
|
|
||||||
locale: string,
|
|
||||||
metadata: {},
|
|
||||||
mode: string,
|
|
||||||
object: string,
|
|
||||||
payment_intent: null | string,
|
|
||||||
payment_link: null | string,
|
|
||||||
payment_method_collection: string,
|
|
||||||
payment_method_configuration_details: null | string,
|
|
||||||
payment_method_options: null | string,
|
|
||||||
payment_method_types: string[],
|
|
||||||
payment_status: string,
|
|
||||||
phone_number_collection: {
|
|
||||||
enabled: boolean
|
|
||||||
},
|
|
||||||
recovered_from: string,
|
|
||||||
setup_intent: null | string,
|
|
||||||
shipping_address_collection: null | string,
|
|
||||||
shipping_cost: null | string,
|
|
||||||
shipping_details: null | string,
|
|
||||||
shipping_options: [],
|
|
||||||
status: string,
|
|
||||||
submit_type: string,
|
|
||||||
subscription: null | string,
|
|
||||||
success_url: string,
|
|
||||||
tax_id_collection: null | string,
|
|
||||||
total_details: {
|
|
||||||
amount_discount: number,
|
|
||||||
amount_shipping: number,
|
|
||||||
amount_tax: number,
|
|
||||||
breakdown: null | string
|
|
||||||
},
|
|
||||||
url: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum SourceModal {
|
|
||||||
SignUp = 'SignUp',
|
|
||||||
SignUpViaPurchase = 'SignUpViaPurchase',
|
|
||||||
BookDemo = 'BookDemo',
|
|
||||||
LearnMore = 'LearnMore',
|
|
||||||
TryIt = 'TryIt',
|
|
||||||
Newsletter = 'Newsletter',
|
|
||||||
}
|
|
||||||
|
|
||||||
export type MailchimpSearchMemberResponse = {
|
|
||||||
exact_matches: {
|
|
||||||
members: MailchimpMember[];
|
|
||||||
total_items: number;
|
|
||||||
},
|
|
||||||
full_search: {
|
|
||||||
members: any[];
|
|
||||||
total_items: number;
|
|
||||||
},
|
|
||||||
_links: [
|
|
||||||
{
|
|
||||||
rel: string;
|
|
||||||
href: string;
|
|
||||||
method: string;
|
|
||||||
targetSchema: string;
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type MailchimpMember = {
|
|
||||||
id: string,
|
|
||||||
email_address: string,
|
|
||||||
unique_email_id: string,
|
|
||||||
contact_id: string,
|
|
||||||
full_name: string,
|
|
||||||
web_id: number,
|
|
||||||
email_type: string,
|
|
||||||
status: string,
|
|
||||||
}
|
|
||||||
|
|
||||||
export type User = {
|
|
||||||
avatar: string;
|
|
||||||
billing_address: string;
|
|
||||||
collectionId: string;
|
|
||||||
collectionName: string;
|
|
||||||
created: string | Date;
|
|
||||||
displayName: string;
|
|
||||||
email: string;
|
|
||||||
emailVisibility: string;
|
|
||||||
firstName: string;
|
|
||||||
id: string
|
|
||||||
lastName: string | Date;
|
|
||||||
lastSeen: string;
|
|
||||||
organisation: string;
|
|
||||||
payment_method: string;
|
|
||||||
role: string;
|
|
||||||
updated: string | Date;
|
|
||||||
username: string;
|
|
||||||
verified: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Subscription = {
|
|
||||||
subscription_id: string,
|
|
||||||
user_id: string,
|
|
||||||
status: string,
|
|
||||||
price_id: string,
|
|
||||||
metadata: string,
|
|
||||||
quantity: number,
|
|
||||||
cancel_at_period_end: boolean,
|
|
||||||
current_period_start: string | Date,
|
|
||||||
current_period_end: string | Date,
|
|
||||||
ended_at: string | Date,
|
|
||||||
cancel_at: string | Date,
|
|
||||||
canceled_at: string | Date,
|
|
||||||
trial_start: string | Date,
|
|
||||||
trial_end:string | Date,
|
|
||||||
product: Product
|
|
||||||
};
|
|
||||||
|
|
||||||
export type SubscriptionSession = {
|
|
||||||
configuration: {
|
|
||||||
active: boolean,
|
|
||||||
application: null | string,
|
|
||||||
business_profile: null | string,
|
|
||||||
created: number,
|
|
||||||
default_return_url: string,
|
|
||||||
features: null | string,
|
|
||||||
id: string,
|
|
||||||
is_default: boolean,
|
|
||||||
livemode: boolean,
|
|
||||||
login_page: null | string,
|
|
||||||
metadata: null | string,
|
|
||||||
object: string,
|
|
||||||
updated: number
|
|
||||||
},
|
|
||||||
created: number,
|
|
||||||
customer: string,
|
|
||||||
flow: null | string,
|
|
||||||
id: string,
|
|
||||||
livemode: boolean,
|
|
||||||
locale: string,
|
|
||||||
object: string,
|
|
||||||
on_behalf_of: string,
|
|
||||||
return_url: string,
|
|
||||||
url: string
|
|
||||||
}
|
|
Loading…
Reference in New Issue