From ca8e1d87dc7ae188644617ffa63c0089c94b38b3 Mon Sep 17 00:00:00 2001 From: Pattadon Date: Thu, 23 Nov 2023 03:09:20 +0700 Subject: [PATCH] Remove particles loader from LoginPage and SignUpPage --- .../components/authentication/LoginPage.jsx | 98 ++--------------- .../components/authentication/SignUpPage.jsx | 100 ++---------------- 2 files changed, 17 insertions(+), 181 deletions(-) diff --git a/frontend/src/components/authentication/LoginPage.jsx b/frontend/src/components/authentication/LoginPage.jsx index bfd942b..5ed8d83 100644 --- a/frontend/src/components/authentication/LoginPage.jsx +++ b/frontend/src/components/authentication/LoginPage.jsx @@ -1,9 +1,6 @@ import { useEffect, useState } from "react"; import { useNavigate, redirect } from "react-router-dom"; import { useGoogleLogin } from "@react-oauth/google"; -import { useCallback } from "react"; -import Particles from "react-tsparticles"; -import { loadFull } from "tsparticles"; import refreshAccessToken from "./refreshAcessToken"; import axiosapi from "../../api/AuthenticationApi"; import { FcGoogle } from "react-icons/fc"; @@ -74,99 +71,20 @@ function LoginPage() { onError: (errorResponse) => console.log(errorResponse), }); { - /* Particles Loader*/ } - const particlesInit = useCallback(async (engine) => { - console.log(engine); - await loadFull(engine); - }, []); - - const particlesLoaded = useCallback(async (container) => { - console.log(container); - }, []); return ( -
- {/* Particles Container */} -
- +
+ {/* Login Box */}
-
+

Login

{/* Email Input */}
diff --git a/frontend/src/components/authentication/SignUpPage.jsx b/frontend/src/components/authentication/SignUpPage.jsx index 7d73580..389a466 100644 --- a/frontend/src/components/authentication/SignUpPage.jsx +++ b/frontend/src/components/authentication/SignUpPage.jsx @@ -1,9 +1,6 @@ import React, { useState } from "react"; import { useNavigate } from "react-router-dom"; import axiosapi from "../../api/AuthenticationApi"; -import { useCallback } from "react"; -import Particles from "react-tsparticles"; -import { loadFull } from "tsparticles"; import { FcGoogle } from "react-icons/fc"; import { useGoogleLogin } from "@react-oauth/google"; @@ -56,16 +53,7 @@ export default function SignUp() { console.log(formData); }; { - /* Particles Loader*/ } - const particlesInit = useCallback(async (engine) => { - console.log(engine); - await loadFull(engine); - }, []); - - const particlesLoaded = useCallback(async (container) => { - console.log(container); - }, []); const googleLoginImplicit = useGoogleLogin({ flow: "auth-code", @@ -90,86 +78,16 @@ export default function SignUp() { }); return ( -
- {/* Particles Container */} -
- +
+ -
-
+
+
{/* Register Form */}

Signup

{/* Email Input */}