Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions frontend/pages/Registration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,6 @@ import Link from "next/link";

export default function Registration() {
const router = useRouter();
<<<<<<< HEAD
const [firstName, setFirstName] = useState();
const [lastName, setLastName] = useState();
const [email, setEmail] = useState();
const [password, setPassword] = useState();
const [code, setCode] = useState();
const [zoom, setZoom] = useState();
const [regError, setRegError] = useState(false);

/* POST DATA */
const postRegInfo = () => {
const postRegData = {
firstname: firstName,
lastname: lastName,
email: email,
password: password,
code: code,
zoom: zoom
};

axios.post('http://localhost:8000/registration', postRegData, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'accept': 'application/json'
}
})
.then(function success(response) {
console.log(response)
const token = response.data.access_token;
Cookies.set('gcode-session', token, { expires: 7 });
router.push('/Login');
})
.catch(function failure(error) {
console.log(error);
setRegError(true);
})
}
/* END POST DATA */

=======
const [firstName, setFirstName] = useState<string>("");
const [lastName, setLastName] = useState<string>("");
const [email, setEmail] = useState<string>("");
Expand Down Expand Up @@ -100,7 +60,6 @@ export default function Registration() {
// saying: "Email is already in use, please try another"
});
}
>>>>>>> a83a657c6a1d49af76567d931302451ead78a092

return (
<ThemeProvider theme={theme}>
Expand Down Expand Up @@ -152,23 +111,7 @@ export default function Registration() {
setCode(event.target.value);
}}
/>
<<<<<<< HEAD

{/* TODO: Make only for admins */}
<TextField
id="outlined-basic"
label="Zoom Link"
variant="outlined"
sx={{ margin: "10px", width: "28.8pc" }}
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
setZoom(event.target.value);
}}
/>

<Button variant="primary" sx={{ margin: "10px", width: "28.8pc" }} onClick={postRegInfo}>
=======
<Button variant="primary" onClick={postInfo} sx={{ margin: "10px", width: "28.8pc" }}>
>>>>>>> a83a657c6a1d49af76567d931302451ead78a092
<h1 className={loginStyles.signInButton}>Create Account</h1>
</Button>
</Box>
Expand Down