Skip to content

Commit 71d39de

Browse files
committed
chore:updated file names, folder structures and the landing page UI
1 parent 91bd4a7 commit 71d39de

File tree

3 files changed

+71
-2
lines changed

3 files changed

+71
-2
lines changed

src/components/Auth/RegisterForm.jsx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React, { useState, useEffect } from "react";
22
import { TextField } from "@mui/material";
3+
import FormControl from "@mui/material/FormControl";
4+
import MenuItem from "@mui/material/MenuItem";
35
import Button from "@mui/material/Button";
46
import { useForm } from "react-hook-form";
57
import { VscEye } from "react-icons/vsc";
@@ -16,6 +18,7 @@ const RegisterForm = ({ handleModeChange }) => {
1618
const [complete, setComplete] = useState("idle");
1719
//---show/hide password option---
1820
const [showPassword, setShowPassword] = useState(false);
21+
const [selectedSchool, setSelectedSchool] = useState(false);
1922
const handleClickShowPassword = () => setShowPassword((show) => !show);
2023

2124
const {
@@ -48,6 +51,11 @@ const RegisterForm = ({ handleModeChange }) => {
4851
validate: passwordMatch,
4952
});
5053

54+
const SchoolNameList = [
55+
"Western Mindanao Adventist Academy",
56+
"Paul’s Institute of Technology of Iligan City, Inc",
57+
];
58+
5159
useEffect(() => {
5260
if (registerStatus === "loading") {
5361
setComplete("loading");
@@ -124,6 +132,56 @@ const RegisterForm = ({ handleModeChange }) => {
124132
</p>
125133
)}
126134
</div>
135+
<FormControl
136+
sx={{
137+
marginBottom: 3,
138+
width: "100%",
139+
}}
140+
>
141+
<TextField
142+
select
143+
label="What School"
144+
variant="outlined"
145+
name="selected_school"
146+
error={selectedSchool ? true : false}
147+
{...register("selected_school", {
148+
required: "This is required.",
149+
})}
150+
SelectProps={{
151+
MenuProps: { disableScrollLock: true },
152+
style: {
153+
height: "47px",
154+
},
155+
}}
156+
>
157+
<MenuItem value="">
158+
<p
159+
className="text-slate-500 text-[12px]"
160+
onClick={() => {
161+
setSelectedSchool(true);
162+
}}
163+
>
164+
Select one
165+
</p>
166+
</MenuItem>
167+
{SchoolNameList.map((school, index) => (
168+
<MenuItem
169+
key={index}
170+
value={school}
171+
onClick={() => {
172+
setSelectedSchool(false);
173+
}}
174+
>
175+
{school}
176+
</MenuItem>
177+
))}
178+
</TextField>
179+
{errors.selected_school && (
180+
<p className="ml-1 mt-1 text-[13px] text-red-500 mb-[-0.2rem]">
181+
{selectedSchool && errors.selected_school.message}
182+
</p>
183+
)}
184+
</FormControl>
127185
<div className="mb-5 w-full">
128186
<TextField
129187
label="Username"
@@ -258,6 +316,12 @@ const RegisterForm = ({ handleModeChange }) => {
258316
background: "#f1c320", // Same color when hovered
259317
},
260318
}}
319+
onClick={() => {
320+
watch("selected_school") === "" ||
321+
watch("selected_school") === undefined
322+
? setSelectedSchool(true)
323+
: setSelectedSchool(false);
324+
}}
261325
>
262326
REGISTER
263327
</Button>

src/screens/Landing.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,12 @@ const Landing = () => {
166166
</button>
167167
)}
168168
</section>
169+
{/* <div className="flex flex-row w-full justify-center z-10">
170+
<div className="w-[1000px] h-[950px] rounded-[50%] bg-green-200 mb-[-20rem]" />
171+
<div className="w-[1000px] h-[950px] rounded-[50%] bg-red-200 " />
172+
</div> */}
169173
{/* -----User Manual on how to use----- */}
170-
<div className="relative bg-[#323232] min-w-full h-full mt-[60px] overflow-hidden pb-10">
174+
<div className="relative bg-[#323232] min-w-full h-full overflow-hidden pb-10 mt-[60px]">
171175
<div className="flex flex-col lg:w-[900px] w-full h-full mx-auto px-4 lg:px-0">
172176
<h1
173177
className="font-bold font_sansita text-[45px] text-[#F5D45E]"

src/screens/SplashScreen.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import React from "react";
1+
import React, { useEffect } from "react";
22
import CircularProgress from "@mui/material/CircularProgress";
33
import BridgetteLogo from "./../assets/bridgette-logo.webp";
4+
45
const SplashScreen = ({ displayMessage }) => {
56
return (
67
<div className="absolute flex flex-col h-full w-full justify-center content-center bg-white">

0 commit comments

Comments
 (0)