PHP Classes

File: frontend/src/components/Routes/Register/index.tsx

Recommend this page to a friend!
  Classes of Carlos Carvalho   yrprey PHP application   frontend/src/components/Routes/Register/index.tsx   Download  
File: frontend/src/components/Routes/Register/index.tsx
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: yrprey PHP application
Web app to learn about OWASP API vulnerabilities
Author: By
Last change:
Date: 8 months ago
Size: 1,682 bytes
 

Contents

Class file image Download
import FormRegister from "./Form"; import { motion } from "framer-motion"; import Header from "@/components/Header"; import { StyledRegisterSection } from "./style"; import InfoBanner from "@/components/InfoBanner"; import Footer from "@/components/Footer"; import HomeButton from "@/components/HomeButton"; import SEO from "@/components/SEO"; import { Context } from "@/context/context"; import { useContext, useEffect } from "react"; import Error404Page from "@/components/ErrorPage"; const Register = () => { const { tokenLocal, router } = useContext(Context); useEffect(() => { const token = localStorage.getItem('token'); if (token) { router.push('/'); } }, []); if (tokenLocal) { return ( <> <Error404Page /> </> ) } return ( <motion.div initial={{ opacity: 0.3 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }} transition={{ duration: 0.5 }} > <SEO title="Sign up ? YRPrey" description="Join us in the search for bugs and vulnerabilities!" /> <Header /> <StyledRegisterSection> <div className="container"> <div className="container-left"> <div className="content-up"> <h1> No <span className="title-details">credit cards or cash</span>{" "} required. </h1> <FormRegister /> </div> </div> <div className="container-right"> <InfoBanner /> </div> </div> </StyledRegisterSection> <Footer /> <HomeButton /> </motion.div> ); }; export default Register;