From 39aef95de19d8b33e79f6dfbf8e033e606646ed0 Mon Sep 17 00:00:00 2001 From: Ciro de Oliveira Date: Wed, 31 Jul 2024 17:18:49 -0300 Subject: [PATCH] first commit in js --- Frontend/app/(authenticated)/account/page.jsx | 36 +++ Frontend/app/(authenticated)/account/page.tsx | 38 --- .../confirm-email-change/[token]/page.jsx | 89 ++++++ .../confirm-email-change/[token]/page.tsx | 89 ------ .../confirm-password-reset/[token]/page.jsx | 108 +++++++ .../confirm-password-reset/[token]/page.tsx | 103 ------- .../confirm-verification/[token]/page.jsx | 108 +++++++ .../confirm-verification/[token]/page.tsx | 60 ---- .../app/(public)/about/{page.tsx => page.jsx} | 71 +++-- .../blogs/[slug]/{page.tsx => page.jsx} | 86 +++--- .../app/(public)/blogs/{page.tsx => page.jsx} | 20 +- .../(public)/contact/{page.tsx => page.jsx} | 18 +- Frontend/app/(public)/pricing/action.js | 51 ++++ Frontend/app/(public)/pricing/actions.ts | 47 --- .../(public)/pricing/{page.tsx => page.jsx} | 18 +- .../(public)/whatsnew/{page.tsx => page.jsx} | 18 +- Frontend/app/actions.js | 287 ++++++++++++++++++ Frontend/app/actions.ts | 278 ----------------- Frontend/app/{layout.tsx => layout.jsx} | 53 ++-- Frontend/app/{not-found.tsx => not-found.jsx} | 8 +- Frontend/app/{page.tsx => page.jsx} | 57 ++-- Frontend/app/sitemap.js | 51 ++++ Frontend/app/sitemap.ts | 52 ---- .../components/{BlogCard.tsx => BlogCard.jsx} | 23 +- ...astPocketBadge.tsx => FastPocketBadge.jsx} | 8 +- .../components/{Footer.tsx => Footer.jsx} | 12 +- ...Button.tsx => GetStartedSectionButton.jsx} | 13 +- ...oogleAnalytics.tsx => GoogleAnalytics.jsx} | 10 +- Frontend/components/Header.jsx | 28 ++ Frontend/components/Header.tsx | 162 ---------- Frontend/components/{Logo.tsx => Logo.jsx} | 16 +- ...alEmailChange.tsx => ModalEmailChange.jsx} | 52 ++-- ...sswordReset.tsx => ModalPasswordReset.jsx} | 43 ++- .../Modals/{ModalSignIn.tsx => ModalSign.jsx} | 56 ++-- .../{ModalSignUp.tsx => ModalSignUp.jsx} | 110 ++++--- .../{Navigation.tsx => Navigation.jsx} | 27 +- .../{PriceCard.tsx => PriceCard.jsx} | 72 ++--- Frontend/components/PriceToggle.jsx | 29 ++ Frontend/components/PriceToggle.tsx | 36 --- Frontend/components/Utilities/Background.jsx | 34 +++ Frontend/components/Utilities/Background.tsx | 33 -- Frontend/components/Utilities/PageWrapper.jsx | 11 + Frontend/components/Utilities/PageWrapper.tsx | 12 - Frontend/components/Utilities/Spacer.jsx | 7 + Frontend/components/Utilities/Spacer.tsx | 12 - .../{YoutubeEmbed.tsx => YoutubeEmbed.jsx} | 20 +- Frontend/constants/{index.ts => index.js} | 7 +- Frontend/lib/auth.js | 20 ++ Frontend/lib/auth.ts | 21 -- Frontend/lib/{pocketbase.ts => pocketbase.js} | 0 Frontend/middleware.js | 23 ++ Frontend/middleware.ts | 23 -- Frontend/sections/AccountContent.jsx | 124 ++++++++ Frontend/sections/AccountContent.tsx | 199 ------------ .../{BlogContent.tsx => BlogContent.jsx} | 12 +- ... => FormLeftDescriptionRightContactUs.jsx} | 44 ++- ...AQ.tsx => RightAlignedBorderBottomFAQ.jsx} | 31 +- .../{CardsFeature.tsx => CardsFeature.jsx} | 6 +- ...sx => ContainerImageIconBlocksFeature.jsx} | 8 +- ...ture.tsx => SolidBackgrondIconFeature.jsx} | 10 +- ...absFeature.tsx => VerticalTabsFeature.jsx} | 27 +- ...ro.tsx => CenterAllignedWithVideoHero.jsx} | 10 +- .../Hero/{SimpleHero.tsx => SimpleHero.jsx} | 8 +- ...oundHero.tsx => SquaredBackgroundHero.jsx} | 14 +- ...eHero.tsx => WaitingListWithImageHero.jsx} | 48 ++- Frontend/sections/Hero/index.js | 8 + Frontend/sections/Hero/index.ts | 8 - .../{Newsletter.tsx => Newsletter.jsx} | 192 ++++++------ .../{PageHeader.tsx => PageHeader.jsx} | 13 +- .../sections/{Payment.tsx => Payment.jsx} | 23 +- ...ardTestemonial.tsx => CardTestemonial.jsx} | 8 +- .../{Testimonial.tsx => Testimonial.jsx} | 6 +- Frontend/sections/Testing/Teste.jsx | 216 +++++++++++++ Frontend/sections/Testing/Teste.tsx | 216 ------------- Frontend/sections/{Video.tsx => Video.jsx} | 82 ++--- Frontend/tailwind.config.js | 113 +++++++ Frontend/tailwind.config.ts | 113 ------- Frontend/tsconfig.json | 2 +- Frontend/types/index.js | 10 + Frontend/utils/colors.js | 14 + Frontend/utils/colors.ts | 12 - Frontend/utils/{form.ts => form.js} | 94 +++--- Frontend/utils/getPostMetaData.js | 11 + Frontend/utils/getPostMetaData.ts | 11 - 84 files changed, 2091 insertions(+), 2268 deletions(-) create mode 100644 Frontend/app/(authenticated)/account/page.jsx delete mode 100644 Frontend/app/(authenticated)/account/page.tsx create mode 100644 Frontend/app/(public)/[ignore]/auth/confirm-email-change/[token]/page.jsx delete mode 100644 Frontend/app/(public)/[ignore]/auth/confirm-email-change/[token]/page.tsx create mode 100644 Frontend/app/(public)/[ignore]/auth/confirm-password-reset/[token]/page.jsx delete mode 100644 Frontend/app/(public)/[ignore]/auth/confirm-password-reset/[token]/page.tsx create mode 100644 Frontend/app/(public)/[ignore]/auth/confirm-verification/[token]/page.jsx delete mode 100644 Frontend/app/(public)/[ignore]/auth/confirm-verification/[token]/page.tsx rename Frontend/app/(public)/about/{page.tsx => page.jsx} (53%) rename Frontend/app/(public)/blogs/[slug]/{page.tsx => page.jsx} (56%) rename Frontend/app/(public)/blogs/{page.tsx => page.jsx} (69%) rename Frontend/app/(public)/contact/{page.tsx => page.jsx} (68%) create mode 100644 Frontend/app/(public)/pricing/action.js delete mode 100644 Frontend/app/(public)/pricing/actions.ts rename Frontend/app/(public)/pricing/{page.tsx => page.jsx} (76%) rename Frontend/app/(public)/whatsnew/{page.tsx => page.jsx} (70%) create mode 100644 Frontend/app/actions.js delete mode 100644 Frontend/app/actions.ts rename Frontend/app/{layout.tsx => layout.jsx} (77%) rename Frontend/app/{not-found.tsx => not-found.jsx} (94%) rename Frontend/app/{page.tsx => page.jsx} (73%) create mode 100644 Frontend/app/sitemap.js delete mode 100644 Frontend/app/sitemap.ts rename Frontend/components/{BlogCard.tsx => BlogCard.jsx} (70%) rename Frontend/components/{FastPocketBadge.tsx => FastPocketBadge.jsx} (99%) rename Frontend/components/{Footer.tsx => Footer.jsx} (98%) rename Frontend/components/{GetStartedSectionButton.tsx => GetStartedSectionButton.jsx} (71%) rename Frontend/components/{GoogleAnalytics.tsx => GoogleAnalytics.jsx} (78%) create mode 100644 Frontend/components/Header.jsx delete mode 100644 Frontend/components/Header.tsx rename Frontend/components/{Logo.tsx => Logo.jsx} (64%) rename Frontend/components/Modals/{ModalEmailChange.tsx => ModalEmailChange.jsx} (72%) rename Frontend/components/Modals/{ModalPasswordReset.tsx => ModalPasswordReset.jsx} (79%) rename Frontend/components/Modals/{ModalSignIn.tsx => ModalSign.jsx} (82%) rename Frontend/components/Modals/{ModalSignUp.tsx => ModalSignUp.jsx} (83%) rename Frontend/components/{Navigation.tsx => Navigation.jsx} (84%) rename Frontend/components/{PriceCard.tsx => PriceCard.jsx} (72%) create mode 100644 Frontend/components/PriceToggle.jsx delete mode 100644 Frontend/components/PriceToggle.tsx create mode 100644 Frontend/components/Utilities/Background.jsx delete mode 100644 Frontend/components/Utilities/Background.tsx create mode 100644 Frontend/components/Utilities/PageWrapper.jsx delete mode 100644 Frontend/components/Utilities/PageWrapper.tsx create mode 100644 Frontend/components/Utilities/Spacer.jsx delete mode 100644 Frontend/components/Utilities/Spacer.tsx rename Frontend/components/Utilities/{YoutubeEmbed.tsx => YoutubeEmbed.jsx} (57%) rename Frontend/constants/{index.ts => index.js} (76%) create mode 100644 Frontend/lib/auth.js delete mode 100644 Frontend/lib/auth.ts rename Frontend/lib/{pocketbase.ts => pocketbase.js} (100%) create mode 100644 Frontend/middleware.js delete mode 100644 Frontend/middleware.ts create mode 100644 Frontend/sections/AccountContent.jsx delete mode 100644 Frontend/sections/AccountContent.tsx rename Frontend/sections/{BlogContent.tsx => BlogContent.jsx} (88%) rename Frontend/sections/ContactUs/{FormLeftDescriptionRightContactUs.tsx => FormLeftDescriptionRightContactUs.jsx} (93%) rename Frontend/sections/FAQ/{RightAlignedBorderBottomFAQ.tsx => RightAlignedBorderBottomFAQ.jsx} (87%) rename Frontend/sections/Features/{CardsFeature.tsx => CardsFeature.jsx} (99%) rename Frontend/sections/Features/{ContainerImageIconBlocksFeature.tsx => ContainerImageIconBlocksFeature.jsx} (98%) rename Frontend/sections/Features/{SolidBackgrondIconFeature.tsx => SolidBackgrondIconFeature.jsx} (97%) rename Frontend/sections/Features/{VerticalTabsFeature.tsx => VerticalTabsFeature.jsx} (93%) rename Frontend/sections/Hero/{CenterAllignedWithVideoHero.tsx => CenterAllignedWithVideoHero.jsx} (92%) rename Frontend/sections/Hero/{SimpleHero.tsx => SimpleHero.jsx} (95%) rename Frontend/sections/Hero/{SquaredBackgroundHero.tsx => SquaredBackgroundHero.jsx} (93%) rename Frontend/sections/Hero/{WaitingListWithImageHero.tsx => WaitingListWithImageHero.jsx} (90%) create mode 100644 Frontend/sections/Hero/index.js delete mode 100644 Frontend/sections/Hero/index.ts rename Frontend/sections/Newsletter/{Newsletter.tsx => Newsletter.jsx} (81%) rename Frontend/sections/{PageHeader.tsx => PageHeader.jsx} (50%) rename Frontend/sections/{Payment.tsx => Payment.jsx} (70%) rename Frontend/sections/Testemonial/{CardTestemonial.tsx => CardTestemonial.jsx} (96%) rename Frontend/sections/{Testimonial.tsx => Testimonial.jsx} (98%) create mode 100644 Frontend/sections/Testing/Teste.jsx delete mode 100644 Frontend/sections/Testing/Teste.tsx rename Frontend/sections/{Video.tsx => Video.jsx} (69%) create mode 100644 Frontend/tailwind.config.js delete mode 100644 Frontend/tailwind.config.ts create mode 100644 Frontend/types/index.js create mode 100644 Frontend/utils/colors.js delete mode 100644 Frontend/utils/colors.ts rename Frontend/utils/{form.ts => form.js} (65%) create mode 100644 Frontend/utils/getPostMetaData.js delete mode 100644 Frontend/utils/getPostMetaData.ts diff --git a/Frontend/app/(authenticated)/account/page.jsx b/Frontend/app/(authenticated)/account/page.jsx new file mode 100644 index 0000000..2fab39f --- /dev/null +++ b/Frontend/app/(authenticated)/account/page.jsx @@ -0,0 +1,36 @@ +import React from "react" +import PageHeader from "@/sections/PageHeader" +import { cookies } from "next/headers" +import { getUserFromCookie } from "@/lib/auth" +import AccountContent from "@/sections/AccountContent" +import { redirect } from "next/navigation" +import pb from "@/lib/pocketbase" +import Background from "@/components/Utilities/Background" +import Footer from "@/components/Footer" +import Spacer from "@/components/Utilities/Spacer" + +export default async function AccountPage() { + const user = await getUserFromCookie(cookies()) + const cookie = cookies().get("pb_auth") + //server side + pb.authStore.loadFromCookie(cookie?.value || "") + !pb.authStore.isValid && redirect("/") + return ( + user && ( +
+ +
+ } /> + {/* */} + +
+
+
+
+ ) + ) +} diff --git a/Frontend/app/(authenticated)/account/page.tsx b/Frontend/app/(authenticated)/account/page.tsx deleted file mode 100644 index 7f572f1..0000000 --- a/Frontend/app/(authenticated)/account/page.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import React from "react"; -import PageHeader from "@/sections/PageHeader"; -import { cookies } from "next/headers"; -import { getUserFromCookie } from "@/lib/auth"; -import { User } from "@/types"; -import AccountContent from "@/sections/AccountContent"; -import { redirect } from "next/navigation"; -import pb from "@/lib/pocketbase"; -import Background from "@/components/Utilities/Background"; -import Footer from "@/components/Footer"; -import Spacer from "@/components/Utilities/Spacer"; - -export default async function AccountPage() { - const user = (await getUserFromCookie(cookies())) as User; - const cookie = cookies().get("pb_auth"); - //server side - pb.authStore.loadFromCookie(cookie?.value || ""); - !pb.authStore.isValid && redirect("/"); - return ( - user && ( -
- -
- - } /> - - -
-
-
-
- ) - ); -} diff --git a/Frontend/app/(public)/[ignore]/auth/confirm-email-change/[token]/page.jsx b/Frontend/app/(public)/[ignore]/auth/confirm-email-change/[token]/page.jsx new file mode 100644 index 0000000..4c58fd6 --- /dev/null +++ b/Frontend/app/(public)/[ignore]/auth/confirm-email-change/[token]/page.jsx @@ -0,0 +1,89 @@ +"use client" + +import React from "react" +import { useForm } from "react-hook-form" +import { yupResolver } from "@hookform/resolvers/yup" +import { changeEmailValidationSchema } from "@/utils/form" +import { toast } from "react-toastify" +import PocketBase from "pocketbase" +import PageWrapper from "@/components/Utilities/PageWrapper" +import { usePathname } from "next/navigation" +import Background from "@/components/Utilities/Background" +import PageHeader from "@/sections/PageHeader" + +const pb = new PocketBase(process.env.NEXT_PUBLIC_POCKETBASE_URL) + +export default function ConfirmEmailChangePage() { + const pathName = usePathname() + const token = pathName.split("/").at(-1) + const { + register, + handleSubmit, + formState: { errors, isSubmitting }, + reset + } = useForm({ + resolver: yupResolver(changeEmailValidationSchema) + }) + + const onSubmit = async data => { + try { + await pb.collection("user").confirmEmailChange(token ?? "", data.password) + reset() + document.getElementById("sign-in-modal")?.click() + } catch (error) { + if (error instanceof Error) { + toast.error("There was a problem. Please try change your email again", { + position: "bottom-left", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "colored" + }) + } + } + } + + return ( + + +
+ } + /> +
+
+ +
+ {errors.password?.message}  +
+
+
+ +
+
+
+
+
+ ) +} diff --git a/Frontend/app/(public)/[ignore]/auth/confirm-email-change/[token]/page.tsx b/Frontend/app/(public)/[ignore]/auth/confirm-email-change/[token]/page.tsx deleted file mode 100644 index 9270ca9..0000000 --- a/Frontend/app/(public)/[ignore]/auth/confirm-email-change/[token]/page.tsx +++ /dev/null @@ -1,89 +0,0 @@ -"use client" - -import React from "react"; -import { useForm } from "react-hook-form"; -import { yupResolver } from "@hookform/resolvers/yup"; -import { changeEmailValidationSchema } from "@/utils/form"; -import { toast } from "react-toastify"; -import PocketBase from 'pocketbase'; -import PageWrapper from "@/components/Utilities/PageWrapper"; -import { usePathname, useRouter } from 'next/navigation'; -import Background from "@/components/Utilities/Background"; -import PageHeader from "@/sections/PageHeader"; - -const pb = new PocketBase(process.env.NEXT_PUBLIC_POCKETBASE_URL as string); - -export default function ConfirmEmailChangePage() { - const pathName = usePathname(); - const token = pathName.split('/').at(-1); - const { - register, - handleSubmit, - formState: { errors, isSubmitting }, - reset - } = useForm({ - resolver: yupResolver(changeEmailValidationSchema), - }); - - const onSubmit = async (data: any) => { - try { - await pb.collection('user').confirmEmailChange( - token ?? "", - data.password, - ); - reset(); - document.getElementById("sign-in-modal")?.click(); - } catch (error) { - if (error instanceof Error) { - toast.error("There was a problem. Please try change your email again", { - position: "bottom-left", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "colored", - }); - } - } - }; - - return ( - - -
- } - /> -
-
- -
- {errors.password?.message}  -
-
-
- -
-
-
-
-
- ); -} diff --git a/Frontend/app/(public)/[ignore]/auth/confirm-password-reset/[token]/page.jsx b/Frontend/app/(public)/[ignore]/auth/confirm-password-reset/[token]/page.jsx new file mode 100644 index 0000000..7399fb4 --- /dev/null +++ b/Frontend/app/(public)/[ignore]/auth/confirm-password-reset/[token]/page.jsx @@ -0,0 +1,108 @@ +"use client" + +import React from "react" +import { useForm } from "react-hook-form" +import { yupResolver } from "@hookform/resolvers/yup" +import { passwordValidationSchema } from "@/utils/form" +import { toast } from "react-toastify" +import PocketBase from "pocketbase" +import PageWrapper from "@/components/Utilities/PageWrapper" +import { usePathname } from "next/navigation" +import Background from "@/components/Utilities/Background" +import PageHeader from "@/sections/PageHeader" + +const pb = new PocketBase(process.env.NEXT_PUBLIC_POCKETBASE_URL) + +export default function ConfirmPasswordResetPage() { + const pathName = usePathname() + const token = pathName.split("/").at(-1) + const { + register, + handleSubmit, + formState: { errors, isSubmitting }, + reset + } = useForm({ + resolver: yupResolver(passwordValidationSchema) + }) + + const onSubmit = async data => { + try { + await pb + .collection("user") + .confirmPasswordReset( + token ?? "", + data.newPassword, + data.newPasswordConfirm + ) + reset() + document.getElementById("sign-in-modal")?.click() + } catch (error) { + if (error instanceof Error) { + toast.error( + "There was a problem. Please try reset your password again", + { + position: "bottom-left", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "colored" + } + ) + } + } + } + + return ( + + +
+ } /> +
+
+ +
+ {errors.newPassword?.message}  +
+
+
+ +
+ {errors.newPasswordConfirm?.message}  +
+
+
+ +
+
+
+
+
+ ) +} diff --git a/Frontend/app/(public)/[ignore]/auth/confirm-password-reset/[token]/page.tsx b/Frontend/app/(public)/[ignore]/auth/confirm-password-reset/[token]/page.tsx deleted file mode 100644 index ef3f365..0000000 --- a/Frontend/app/(public)/[ignore]/auth/confirm-password-reset/[token]/page.tsx +++ /dev/null @@ -1,103 +0,0 @@ -"use client" - -import React from "react"; -import { useForm } from "react-hook-form"; -import { yupResolver } from "@hookform/resolvers/yup"; -import { passwordValidationSchema } from "@/utils/form"; -import { toast } from "react-toastify"; -import PocketBase from 'pocketbase'; -import PageWrapper from "@/components/Utilities/PageWrapper"; -import { usePathname, useRouter } from 'next/navigation'; -import Background from "@/components/Utilities/Background"; -import PageHeader from "@/sections/PageHeader"; - -const pb = new PocketBase(process.env.NEXT_PUBLIC_POCKETBASE_URL as string); - -export default function ConfirmPasswordResetPage() { - const pathName = usePathname(); - const token = pathName.split('/').at(-1); - const { - register, - handleSubmit, - formState: { errors, isSubmitting }, - reset - } = useForm({ - resolver: yupResolver(passwordValidationSchema), - }); - - const onSubmit = async (data: any) => { - try { - await pb.collection('user').confirmPasswordReset( - token ?? "", - data.newPassword, - data.newPasswordConfirm, - ); - reset() - document.getElementById("sign-in-modal")?.click(); - } catch (error) { - if (error instanceof Error) { - toast.error("There was a problem. Please try reset your password again", { - position: "bottom-left", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "colored", - }); - } - } - }; - - return ( - - -
- } - /> -
-
- -
- {errors.newPassword?.message}  -
-
-
- -
- {errors.newPasswordConfirm?.message}  -
-
-
- -
-
-
-
-
- ); -} diff --git a/Frontend/app/(public)/[ignore]/auth/confirm-verification/[token]/page.jsx b/Frontend/app/(public)/[ignore]/auth/confirm-verification/[token]/page.jsx new file mode 100644 index 0000000..7399fb4 --- /dev/null +++ b/Frontend/app/(public)/[ignore]/auth/confirm-verification/[token]/page.jsx @@ -0,0 +1,108 @@ +"use client" + +import React from "react" +import { useForm } from "react-hook-form" +import { yupResolver } from "@hookform/resolvers/yup" +import { passwordValidationSchema } from "@/utils/form" +import { toast } from "react-toastify" +import PocketBase from "pocketbase" +import PageWrapper from "@/components/Utilities/PageWrapper" +import { usePathname } from "next/navigation" +import Background from "@/components/Utilities/Background" +import PageHeader from "@/sections/PageHeader" + +const pb = new PocketBase(process.env.NEXT_PUBLIC_POCKETBASE_URL) + +export default function ConfirmPasswordResetPage() { + const pathName = usePathname() + const token = pathName.split("/").at(-1) + const { + register, + handleSubmit, + formState: { errors, isSubmitting }, + reset + } = useForm({ + resolver: yupResolver(passwordValidationSchema) + }) + + const onSubmit = async data => { + try { + await pb + .collection("user") + .confirmPasswordReset( + token ?? "", + data.newPassword, + data.newPasswordConfirm + ) + reset() + document.getElementById("sign-in-modal")?.click() + } catch (error) { + if (error instanceof Error) { + toast.error( + "There was a problem. Please try reset your password again", + { + position: "bottom-left", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "colored" + } + ) + } + } + } + + return ( + + +
+ } /> +
+
+ +
+ {errors.newPassword?.message}  +
+
+
+ +
+ {errors.newPasswordConfirm?.message}  +
+
+
+ +
+
+
+
+
+ ) +} diff --git a/Frontend/app/(public)/[ignore]/auth/confirm-verification/[token]/page.tsx b/Frontend/app/(public)/[ignore]/auth/confirm-verification/[token]/page.tsx deleted file mode 100644 index 15382d1..0000000 --- a/Frontend/app/(public)/[ignore]/auth/confirm-verification/[token]/page.tsx +++ /dev/null @@ -1,60 +0,0 @@ -"use client" - -import React, { useEffect } from "react"; -import { toast } from "react-toastify"; -import PocketBase from 'pocketbase'; -import PageWrapper from "@/components/Utilities/PageWrapper"; -import { usePathname, useRouter } from 'next/navigation'; -import Background from "@/components/Utilities/Background"; -import PageHeader from "@/sections/PageHeader"; - -const pb = new PocketBase(process.env.NEXT_PUBLIC_POCKETBASE_URL as string); - -export default function ConfirmVerification() { - const pathName = usePathname(); - const router = useRouter(); - const token = pathName.split('/').at(-1); - - useEffect(() => { - (async () => { - try { - await pb.collection('user').confirmVerification( - token ?? "" - ); - } catch (error) { - if (error instanceof Error) { - toast.error("There was a problem. Please try confirm your email again", { - position: "bottom-left", - autoClose: 5000, - hideProgressBar: false, - closeOnClick: true, - pauseOnHover: true, - draggable: true, - progress: undefined, - theme: "colored", - }); - } - } - })() - }, []) - - const handleSignInRedirect = () => { - document.getElementById("sign-in-modal")?.click(); - }; - - return ( - - -
- } - /> - -
-
-
- ); -} diff --git a/Frontend/app/(public)/about/page.tsx b/Frontend/app/(public)/about/page.jsx similarity index 53% rename from Frontend/app/(public)/about/page.tsx rename to Frontend/app/(public)/about/page.jsx index aeae38f..268d73c 100644 --- a/Frontend/app/(public)/about/page.tsx +++ b/Frontend/app/(public)/about/page.jsx @@ -1,8 +1,8 @@ -import PageHeader from "@/sections/PageHeader"; -import React from "react"; -import Footer from "@/components/Footer"; -import Image from "next/image"; -import Link from "next/link"; +import PageHeader from "@/sections/PageHeader" +import React from "react" +import Footer from "@/components/Footer" +import Image from "next/image" +import Link from "next/link" export default async function About() { return ( @@ -15,20 +15,45 @@ export default async function About() {

- In 2023 I built Sign365 using pocketbase - and setup an open source library to help people get setup with Stripe - + Pocketbase. As 2024 has come around I have had more and more - requests for applications and features on the existing code. I built a - codebase that would save me 20 hours + in the bootstrapping time to - get my applications ready. That is why I had to build FastPocket an - easy solution to give everyone a head start. + In 2023 I built{" "} + + Sign365 + {" "} + using pocketbase and setup an open source library to help people get + setup with{" "} + + Stripe + Pocketbase + + . As 2024 has come around I have had more and more requests for + applications and features on the existing code. I built a codebase + that would save me 20 hours + in the bootstrapping time to get my + applications ready. That is why I had to build{" "} + + FastPocket + {" "} + an easy solution to give everyone a head start.

After reflecting on the challenges that developers face building their applications, I've seen that there will never be one codebase that suits all developers. But I am sure for those who are opensourcing, self-hosting and want to spin up an application quickly - they will be able to do it using FastPocket + they will be able to do it using{" "} + + FastPocket +

I am taking all of the knowledge that I have gained across 20+ @@ -38,11 +63,23 @@ export default async function About() { that have been battle tested in enterprise code

- So I've committed to building FastPocket to help you build your - projects faster to get paid. + So I've committed to building{" "} + + FastPocket + {" "} + to help you build your projects faster to get paid.

- FastPocket will get you producing more with less development. + + FastPocket + {" "} + will get you producing more with less development.

I know that your next project will grow exponentially because of the @@ -69,5 +106,5 @@ export default async function About() {