"use client"; import React from "react"; import { Title } from "../../../../components/UI/Elements/Styles/Title"; import { signup } from "../../../../services/auth/auth"; import { useRouter } from "next/navigation"; const SignUp = (params: any) => { const org_slug = params.params.orgslug; const router = useRouter(); const [email, setEmail] = React.useState(""); const [password, setPassword] = React.useState(""); const [username, setUsername] = React.useState(""); const handleSubmit = (e: any) => { e.preventDefault(); console.log({ email, password, username, org_slug }); alert(JSON.stringify({ email, password, username, org_slug })); try { signup({ email, password, username, org_slug }); router.push("/"); } catch (err) { console.log(err); } }; const handleEmailChange = (e: any) => { setEmail(e.target.value); }; const handlePasswordChange = (e: any) => { setPassword(e.target.value); }; const handleUsernameChange = (e: any) => { setUsername(e.target.value); }; return (
Sign up {/* Create a login ui with tailwindcss */}
Already have an account? Login Home
); }; export default SignUp;