diff --git a/src/Components/LoginModal/LoginModal.tsx b/src/Components/LoginModal/LoginModal.tsx index ba18222..d92cd0d 100644 --- a/src/Components/LoginModal/LoginModal.tsx +++ b/src/Components/LoginModal/LoginModal.tsx @@ -7,7 +7,6 @@ import IconButton from "@mui/material/IconButton"; import Visibility from "@mui/icons-material/Visibility"; import VisibilityOff from "@mui/icons-material/VisibilityOff"; import Checkbox from "@mui/material/Checkbox"; -import Button from "../Button/Button"; import { useNavigate } from "react-router-dom"; import { LoginAPI } from "../API/API"; import { useDispatch } from "react-redux"; diff --git a/src/Components/RegisterModal/RegisterModal.tsx b/src/Components/RegisterModal/RegisterModal.tsx index ca49625..4bf18d8 100644 --- a/src/Components/RegisterModal/RegisterModal.tsx +++ b/src/Components/RegisterModal/RegisterModal.tsx @@ -1,13 +1,11 @@ import { useState } from "react"; -import styles from "../../styles"; -import { colors } from "../../styles"; +import styles, { colors } from "../../styles"; import TextField from "@mui/material/TextField"; import InputAdornment from "@mui/material/InputAdornment"; import IconButton from "@mui/material/IconButton"; import Visibility from "@mui/icons-material/Visibility"; import VisibilityOff from "@mui/icons-material/VisibilityOff"; -import { AppRegistration } from "@mui/icons-material"; -import Button from "../Button/Button"; +import Logo_dako from "../../assets/Logo_dako.png"; import { useNavigate } from "react-router-dom"; import { RegisterAPI } from "../API/API"; import { toast } from "react-toastify"; @@ -34,216 +32,263 @@ export default function RegisterModal() { const [error, setError] = useState(""); return ( <> -
- +
-

Get Started

-
+ > + -
- ) => { - setUser({ ...user, first_name: e.target.value }); - setError(""); - }} - value={user.first_name} - placeholder={"Enter your first name"} - /> - ) => - setUser({ ...user, last_name: e.target.value }) - } - value={user.last_name} - placeholder={"Enter your last name"} - /> - ) => - setUser({ ...user, email: e.target.value }) - } - value={user.email} - placeholder={"Enter your email"} - /> - - - Course - - ) => { - setUser({ ...user, course: e.target.value }); - setError(""); +

-

+

+ Enter required fields +

+
+ +
+

+ {error} +

+
+ +
+ ) => { + setUser({ ...user, first_name: e.target.value }); + setError(""); + }} + value={user.first_name} + placeholder={"Enter your first name"} + /> + ) => + setUser({ ...user, last_name: e.target.value }) + } + value={user.last_name} + placeholder={"Enter your last name"} + /> + ) => + setUser({ ...user, email: e.target.value }) + } + value={user.email} + placeholder={"Enter your email"} + /> + + + + Course + + ) => { + setUser({ ...user, course: e.target.value }); + setError(""); }} > - } - label="BS Chemistry" - style={styles.text_dark} - /> - } - label="BS Food Technology" - style={styles.text_dark} - /> - } - label="BS Applied Physics" - style={styles.text_dark} - /> - } - label="BS Environmental Science" - style={styles.text_dark} - /> -
-
-
- ) => { - setUser({ ...user, username: e.target.value }); - setError(""); - }} - value={user.username} - placeholder={"Enter username"} - /> - - setShowPassword(!showPassword)} - edge="end" - > - {showPassword ? : } - - - ), - }} - label="Password" - placeholder={"Enter password"} - onChange={(e: React.ChangeEvent) => - setUser({ ...user, password: e.target.value }) - } - value={user.password} - /> - - setShowPassword(!showPassword)} - edge="end" - > - {showPassword ? : } - - - ), - }} - label="Confirm Password" - placeholder={"Re-enter password"} - onChange={(e: React.ChangeEvent) => { - setUser({ ...user, confirm_password: e.target.value }); - setError(""); - }} - value={user.confirm_password} - /> -
-

{error}

-
-
+ +
+ +
+ +
+
); } diff --git a/src/index.css b/src/index.css index b2acf00..69476d9 100644 --- a/src/index.css +++ b/src/index.css @@ -82,3 +82,25 @@ button:focus-visible { background-color: #f9f9f9; } } + +.custom-scrollbar { + overflow-y: scroll; + max-height: 800px; + scrollbar-width: thin; /* For Firefox */ + -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */ + -ms-overflow-style: none; /* For IE */ + scrollbar-color: transparent transparent; /* For WebKit */ +} + +.custom-scrollbar::-webkit-scrollbar { + width: 6px; /* Adjust the width as needed */ +} + +.custom-scrollbar::-webkit-scrollbar-thumb { + background-color: #c4c4c4; /* Color of the thumb */ + border-radius: 3px; /* Rounded corners of the thumb */ +} + +.custom-scrollbar::-webkit-scrollbar-track { + background-color: #f0f0f0; /* Color of the track */ +}