diff --git a/frontend/peerprep/app/assets/images/logo.svg b/frontend/peerprep/app/assets/images/logo.svg new file mode 100644 index 000000000..cdf59648d --- /dev/null +++ b/frontend/peerprep/app/assets/images/logo.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/frontend/peerprep/app/pages/login.tsx b/frontend/peerprep/app/pages/login.tsx new file mode 100644 index 000000000..d5a7aa334 --- /dev/null +++ b/frontend/peerprep/app/pages/login.tsx @@ -0,0 +1,70 @@ +import { Grid, TextInput, Button, PasswordInput, Divider, Text, Image } from "@mantine/core"; +import { useForm } from "@mantine/form"; +import { Link } from "react-router"; +import logo from "../assets/images/logo.svg"; + +export function meta() { + return [ + { title: "PeerPrep - Login" }, + { name: "description", content: "Welcome to PeerPrep!" }, + ]; +} + +export default function Login() { + const form = useForm({ + initialValues: { + email: "", + password: "", + }, + + validate: { + email: (value) => (/^\S+@\S+$/.test(value) ? null : "Invalid email"), + password: (value) => + value.length < 6 ? "Password must be at least 6 characters" : null, + }, + }); + + return ( + + + + + PeerPrep Logo +
console.log(values))}> + + + + + + + + + +
+ + + + + Don't have an account? Sign up! + +
+
+
+
+ ); +} diff --git a/frontend/peerprep/app/pages/signup.tsx b/frontend/peerprep/app/pages/signup.tsx new file mode 100644 index 000000000..fe7f9858a --- /dev/null +++ b/frontend/peerprep/app/pages/signup.tsx @@ -0,0 +1,81 @@ +import { Grid, TextInput, Button, PasswordInput, Divider, Text, Image } from "@mantine/core"; +import { useForm } from "@mantine/form"; +import { Link } from "react-router"; +import logo from "../assets/images/logo.svg"; + +export function meta() { + return [ + { title: "PeerPrep - Signup" }, + { name: "description", content: "Welcome to PeerPrep!" }, + ]; +} + +export default function Signup() { + const form = useForm({ + initialValues: { + email: "", + username: "", + password: "", + }, + + validate: { + email: (value) => (/^\S+@\S+$/.test(value) ? null : "Invalid email"), + password: (value) => + value.length < 6 ? "Password must be at least 6 characters" : null, + }, + }); + + return ( + + + + + PeerPrep Logo +
console.log(values))}> + + + + + + + + + + + + +
+ + + + + Already have an account? Log in! + +
+
+
+
+ ); +}