Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #237

Merged
merged 210 commits into from
Nov 20, 2024
Merged

Dev #237

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
d85c3b4
initialize update-dashboard branch
RyamL1221 Jun 7, 2024
8bddc42
Merge branch 'dev' of https://github.com/HackRU/frontendv2 into propa…
RyamL1221 Jul 28, 2024
88199f5
added images and fixed about format
yoge1212 Aug 11, 2024
f2eb76a
Updated navbar and top of page with new design. still needs extra for…
vineetbogam15 Aug 12, 2024
b47ec23
Displays error and success message to the user in forgot password
RyamL1221 Aug 13, 2024
b8f215d
attempting to fix build issues
avsomers25 Aug 13, 2024
5e0dcfc
Merge pull request #152 from HackRU/propagate-errors
avsomers25 Aug 13, 2024
30e6154
changed about section
yoge1212 Aug 14, 2024
fb6bbc2
start of schedule section
avsomers25 Aug 14, 2024
6365a5d
cards
avsomers25 Aug 14, 2024
5af9ef5
about-section-fixes
yoge1212 Aug 14, 2024
3b4bc4f
about-fix
yoge1212 Aug 14, 2024
63b6c65
Merge pull request #153 from HackRU/148-about-section-first-update
avsomers25 Aug 14, 2024
963832f
Added hover effect to logo and fixed navbar issue
vineetbogam15 Aug 16, 2024
157d1f2
hero fixes
avsomers25 Aug 16, 2024
bfb73e8
build errors
avsomers25 Aug 16, 2024
509b72c
more build fixes
avsomers25 Aug 16, 2024
71cef1e
Merge branch 'dev' into f24design-navbar
avsomers25 Aug 16, 2024
d72a891
Merge pull request #151 from HackRU/f24design-navbar
avsomers25 Aug 16, 2024
04f6a5d
minor fixes
avsomers25 Aug 16, 2024
90fbdd7
changed bottom image
avsomers25 Aug 17, 2024
3e00243
images larger, fixing quality issues
avsomers25 Aug 18, 2024
b36f603
event map styling and hidden
avsomers25 Aug 18, 2024
5b07e12
Update page.tsx
avsomers25 Aug 18, 2024
767ff59
s24 to f24
avsomers25 Aug 18, 2024
9a62717
hackru logo updates
avsomers25 Aug 18, 2024
e6187e3
bigger font, fixed logo, and better buttons
avsomers25 Aug 20, 2024
84740c6
new logo
avsomers25 Aug 21, 2024
ad16891
Cursor!
avsomers25 Aug 22, 2024
0a64a07
styling on non landing pages
avsomers25 Aug 24, 2024
e3b4ce5
fixing file upload failing and linting errors
avsomers25 Aug 26, 2024
6a8d23f
last resume fix
avsomers25 Aug 28, 2024
ff3a0d2
changing vars from local dev back to env vars used in dev and prod de…
avsomers25 Aug 28, 2024
ac7b85c
making bitsprout the placeholder sponsor
avsomers25 Aug 28, 2024
d3dae22
Merge pull request #157 from HackRU/dev
avsomers25 Aug 28, 2024
41a0c10
New Colors and fixed added options to dropdowns
avsomers25 Aug 29, 2024
fdcdeee
Merge pull request #158 from HackRU/dev
avsomers25 Aug 29, 2024
0f8219a
Adding discord link
avsomers25 Aug 29, 2024
194f754
Merge pull request #159 from HackRU/dev
avsomers25 Aug 29, 2024
088f93e
Font update, forgot password fixes
avsomers25 Sep 1, 2024
046079c
Merge pull request #160 from HackRU/dev
avsomers25 Sep 1, 2024
b62b376
Update definitions.ts
avsomers25 Sep 2, 2024
113622d
Merge pull request #161 from HackRU/dev
avsomers25 Sep 2, 2024
3232013
Update waiver.pdf
avsomers25 Sep 4, 2024
f5d4151
Merge pull request #162 from HackRU/dev
avsomers25 Sep 4, 2024
5b9e849
Actually making None Option
avsomers25 Sep 5, 2024
7075eb6
Merge pull request #164 from HackRU/dev
avsomers25 Sep 5, 2024
727d4ea
fixing registration
avsomers25 Sep 8, 2024
5cafbad
Merge pull request #168 from HackRU/dev
avsomers25 Sep 11, 2024
7e235e8
Update page.tsx
avsomers25 Sep 15, 2024
dba93dd
Merge pull request #169 from HackRU/dev
avsomers25 Sep 15, 2024
a7246fe
Update Hero.tsx
avsomers25 Sep 16, 2024
80e7a5a
Merge pull request #170 from HackRU/dev
avsomers25 Sep 16, 2024
a7ca812
Update Navbar.tsx
avsomers25 Sep 18, 2024
b389f1a
Merge pull request #171 from HackRU/dev
avsomers25 Sep 18, 2024
7e1017c
Update discord.tsx
avsomers25 Sep 19, 2024
a149423
Merge pull request #172 from HackRU/dev
avsomers25 Sep 19, 2024
379aabc
Updated signup form
Hetp29 Sep 22, 2024
0282477
Updated signup form to show missing fields
Hetp29 Sep 22, 2024
9b0a5fa
defined FieldKey
Hetp29 Sep 22, 2024
223da07
Sponsors
avsomers25 Sep 22, 2024
1206cda
Merge pull request #181 from HackRU/dev
avsomers25 Sep 22, 2024
89f57a7
Fixed unnecessary padding + readable font
sanasnaik Sep 22, 2024
4f515e2
Fixed password not being hidden + padding issues on input boxes
sanasnaik Sep 22, 2024
cfd7a6e
fixing mobile styling causing strange scrolling on signup pages
avsomers25 Sep 23, 2024
56ecaf7
Merge pull request #183 from HackRU/dev
avsomers25 Sep 23, 2024
58ac479
Updated signup form
Hetp29 Sep 22, 2024
924a99b
Updated signup form to show missing fields
Hetp29 Sep 22, 2024
0c5c472
defined FieldKey
Hetp29 Sep 22, 2024
d93ae0c
Added missing code from dev to resolve merge conflict
Hetp29 Sep 24, 2024
19ad669
Added fromd ev
Hetp29 Sep 24, 2024
2014302
Merge branch 'dev' into fix-signup-form
Hetp29 Sep 24, 2024
7267b03
Fixed success and error message coloring
sanasnaik Sep 24, 2024
173e0b4
Added time limit between requests + margin fixing
sanasnaik Sep 24, 2024
f32e316
removing double background
avsomers25 Sep 25, 2024
9d3bef2
removing large left side padding
avsomers25 Sep 25, 2024
e00b421
changing lockout to 1 min
avsomers25 Sep 25, 2024
b67a4ef
Merge pull request #186 from HackRU/fix-signup-form
avsomers25 Sep 25, 2024
7a7f7b0
Merge branch 'dev' into 165-password-reset-styling
avsomers25 Sep 25, 2024
eb63f5f
Merge pull request #188 from HackRU/165-password-reset-styling
avsomers25 Sep 25, 2024
127152b
Update page.tsx
avsomers25 Sep 25, 2024
2bf21dd
Merge branch 'main' into dev
avsomers25 Sep 25, 2024
d190a93
Merge pull request #189 from HackRU/dev
avsomers25 Sep 25, 2024
23db5d4
fixing client error
avsomers25 Sep 26, 2024
744bea2
Merge pull request #190 from HackRU/dev
avsomers25 Sep 26, 2024
010aa30
new sponsor
avsomers25 Sep 30, 2024
36aa47b
Merge pull request #191 from HackRU/dev
avsomers25 Sep 30, 2024
9e7427a
Update Navbar.tsx
avsomers25 Oct 1, 2024
70644cf
Merge pull request #192 from HackRU/dev
avsomers25 Oct 1, 2024
e294150
sponsor links to images, new tracks
avsomers25 Oct 2, 2024
290825c
Merge pull request #193 from HackRU/dev
avsomers25 Oct 2, 2024
fa63b46
Update About.tsx
avsomers25 Oct 2, 2024
132a1c3
Merge pull request #194 from HackRU/dev
avsomers25 Oct 2, 2024
3d37788
fixed logic
avsomers25 Oct 2, 2024
a205d1a
Merge pull request #195 from HackRU/dev
avsomers25 Oct 2, 2024
37374af
Update page.tsx
avsomers25 Oct 2, 2024
4b8651e
Merge pull request #196 from HackRU/dev
avsomers25 Oct 2, 2024
5ec8fcb
Update pnpm-lock.yaml
sanasnaik Oct 6, 2024
1d037d1
logout while in organizer view
Hetp29 Oct 7, 2024
0f3d008
Merge pull request #201 from HackRU/logout-organizer-issue
avsomers25 Oct 8, 2024
a63bf0d
Update schools.csv
avsomers25 Oct 8, 2024
8a141fb
Update page.tsx
avsomers25 Oct 8, 2024
6efce04
Merge pull request #202 from HackRU/dev
avsomers25 Oct 8, 2024
73e5c82
adding more error checking
avsomers25 Oct 10, 2024
c16fe6c
Merge pull request #203 from HackRU/dev
avsomers25 Oct 10, 2024
3bd0558
icims
avsomers25 Oct 10, 2024
f6425d3
Merge pull request #204 from HackRU/dev
avsomers25 Oct 10, 2024
2756eea
leaderboard
yoge1212 Oct 11, 2024
ad62250
Update page.tsx
yoge1212 Oct 11, 2024
e70c525
Update actions.ts
kevinmonisit Oct 11, 2024
88be801
Update actions.ts
avsomers25 Oct 12, 2024
f623f29
Merge pull request #209 from HackRU/kevinmonisit-patch-1
avsomers25 Oct 12, 2024
ab234a8
Merge pull request #210 from HackRU/dev
avsomers25 Oct 12, 2024
52912ad
fixed error
yoge1212 Oct 12, 2024
6ee8915
Added register button "loading" state
sanasnaik Oct 13, 2024
a34a760
redbull
avsomers25 Oct 13, 2024
0031eef
Merge branch 'dev' of https://github.com/HackRU/frontendv2 into dev
avsomers25 Oct 13, 2024
a1d5230
Merge pull request #211 from HackRU/dev
avsomers25 Oct 13, 2024
89d6b62
Merge branch 'main' into 182-lockout-buttons-that-take-some-time-do-s…
sanasnaik Oct 13, 2024
4ea642e
Fixed formatting
sanasnaik Oct 13, 2024
79cd0c5
Merge pull request #200 from HackRU/182-lockout-buttons-that-take-som…
avsomers25 Oct 13, 2024
230440b
Merge pull request #212 from HackRU/dev
avsomers25 Oct 13, 2024
be00dfd
Created field to manually enter in user email as backup if qr code fails
vineetbogam15 Oct 13, 2024
3db6194
Merge pull request #213 from HackRU/manual_backup
avsomers25 Oct 13, 2024
ba531bf
Merge pull request #207 from HackRU/175-leaderboard
avsomers25 Oct 13, 2024
86d0dd1
manual points
avsomers25 Oct 13, 2024
8de22e5
Update organizerView.tsx
avsomers25 Oct 13, 2024
1496f10
points not point oops
avsomers25 Oct 13, 2024
24ecc65
Sponsor A/B
avsomers25 Oct 13, 2024
a847923
Basic points on dashboard
avsomers25 Oct 14, 2024
fd02037
Update organizerView.tsx
avsomers25 Oct 14, 2024
c17f2d0
Google Cloud
avsomers25 Oct 14, 2024
e96301e
Direct commit to main to avoid leaderboard on main
avsomers25 Oct 14, 2024
b19f745
added scroll
yoge1212 Oct 15, 2024
9beb24a
Merge pull request #217 from HackRU/175-leaderboard
avsomers25 Oct 15, 2024
236a5f3
Waiver as doc and text on dashboard
avsomers25 Oct 15, 2024
b74f08d
Checked-in to checked_in
kevinmonisit Oct 15, 2024
c002145
Update profileHeader.tsx
avsomers25 Oct 15, 2024
4b2225d
Update profileHeader.tsx
avsomers25 Oct 15, 2024
9c9d3ad
fix to accounts that have an error field
avsomers25 Oct 17, 2024
9ca0930
Update data.ts
avsomers25 Oct 19, 2024
ca482ef
Raffle (#205)
kevinmonisit Oct 19, 2024
7da6b72
Merge branch 'main' into dev
kevinmonisit Oct 19, 2024
1ae0971
Removed home from the navbar
kevinmonisit Oct 19, 2024
d3e19f9
Fixed invalid registration statuses
kevinmonisit Oct 19, 2024
d1cfc9d
Added subtraction or minus in manual point insertion
kevinmonisit Oct 19, 2024
29bffff
First Last instead of id on leaderboard
avsomers25 Oct 19, 2024
7715217
Update profileHeader.tsx
avsomers25 Oct 19, 2024
39efa3b
raffle on dashboard only if checked in
avsomers25 Oct 19, 2024
46aa90c
Merge pull request #214 from HackRU/dev
avsomers25 Oct 19, 2024
9ff71f3
handle read errors
avsomers25 Oct 20, 2024
4a502f0
Update skeletons.tsx
avsomers25 Oct 20, 2024
8b16ed2
Merge pull request #222 from HackRU/dev
avsomers25 Oct 20, 2024
0083645
sponsor can only use Sponsor AB
avsomers25 Oct 21, 2024
2cb02e0
Update Sponsors.tsx
avsomers25 Oct 21, 2024
d58c313
Update Sponsors.tsx
avsomers25 Oct 21, 2024
7c476de
rgc
avsomers25 Oct 22, 2024
4345872
Update actions.ts
avsomers25 Oct 22, 2024
f5692d7
Update organizerView.tsx
avsomers25 Oct 22, 2024
d715856
Urgent message for status (#224)
kevinmonisit Oct 23, 2024
8bcf5e0
Change to the coming message
kevinmonisit Oct 23, 2024
a8d3c0e
Change to coming message
kevinmonisit Oct 23, 2024
40f017a
Changed messages regarding statuses
kevinmonisit Oct 23, 2024
4231ee2
Fixed typo
kevinmonisit Oct 23, 2024
37bec9d
Update page.tsx
avsomers25 Oct 23, 2024
245dcb6
tetris
avsomers25 Oct 23, 2024
a1ccd7d
Update utils.ts
avsomers25 Oct 23, 2024
4105e31
Update pnpm-lock.yaml
avsomers25 Oct 23, 2024
d2de1e9
Update utils.ts
avsomers25 Oct 23, 2024
8ad7581
Update page.tsx
avsomers25 Oct 23, 2024
79d05a7
Merge branch 'dev' into tetris2
avsomers25 Oct 23, 2024
3de8716
Merge pull request #225 from HackRU/tetris2
avsomers25 Oct 23, 2024
a514b3c
Merge branch 'main' into dev
avsomers25 Oct 23, 2024
b1d4197
Merge pull request #226 from HackRU/dev
avsomers25 Oct 23, 2024
6590e77
new sponsors
avsomers25 Oct 23, 2024
220b78b
Update Sponsors.tsx
avsomers25 Oct 23, 2024
0ee61aa
Merge pull request #227 from HackRU/dev
avsomers25 Oct 23, 2024
4ab9b18
Update profileHeader.tsx (#228)
kevinmonisit Oct 23, 2024
eb2f79f
status change
kevinmonisit Oct 24, 2024
95db0b0
Typo fix
kevinmonisit Oct 24, 2024
dd80d41
Waitlist typo fix
kevinmonisit Oct 24, 2024
6bca922
opt in
avsomers25 Oct 24, 2024
b05a08b
Update Schedule.tsx
avsomers25 Oct 24, 2024
54b80e5
Update page.tsx
avsomers25 Oct 25, 2024
8c1e39e
Merge pull request #230 from HackRU/dev
avsomers25 Oct 25, 2024
a9fe316
fixed schedule and new sponsor
avsomers25 Oct 25, 2024
27b330d
Update Schedule.tsx
avsomers25 Oct 25, 2024
125e4af
Merge pull request #231 from HackRU/dev
avsomers25 Oct 25, 2024
4264591
Improved scanning messages (#229)
kevinmonisit Oct 25, 2024
5b618ba
Added required opt in choice for MLH
kevinmonisit Oct 25, 2024
815d97a
events list
avsomers25 Oct 25, 2024
d4d93e9
Update organizerView.tsx
avsomers25 Oct 25, 2024
4531f7e
Added header to pre-dashboard-pre-opt-in page
kevinmonisit Oct 25, 2024
aa82b84
Merge pull request #233 from HackRU/dev
avsomers25 Oct 25, 2024
cae5a2f
Update Schedule.tsx
avsomers25 Oct 25, 2024
ad7b431
Merge pull request #234 from HackRU/dev
avsomers25 Oct 25, 2024
212bd73
Update profileHeader.tsx
avsomers25 Oct 25, 2024
6ecdeed
Update profileHeader.tsx
avsomers25 Oct 25, 2024
092a004
Merge pull request #232 from HackRU/opt-in-disable-dashboard
avsomers25 Oct 25, 2024
9342daf
Change to message
kevinmonisit Oct 26, 2024
10c1c40
Update page.tsx
avsomers25 Oct 26, 2024
4bc49b8
new points
avsomers25 Oct 26, 2024
33ab30b
Update organizerView.tsx
avsomers25 Oct 26, 2024
19d8606
point adjustment
kevinmonisit Oct 26, 2024
a9156b7
new points
kevinmonisit Oct 26, 2024
ec36864
Change
kevinmonisit Oct 26, 2024
48a25d4
message
kevinmonisit Oct 27, 2024
902f469
Prize Mapping change
kevinmonisit Oct 27, 2024
1d2b382
Update page.tsx
avsomers25 Nov 19, 2024
09ae919
Merge pull request #236 from HackRU/main
avsomers25 Nov 19, 2024
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
32 changes: 16 additions & 16 deletions app/(pre-dashboard)/(entry)/forgot/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client"

import { Button } from '@/app/ui/button';
import Image from 'next/image';


import { Forgot } from '../../../lib/actions';
Expand All @@ -16,8 +17,6 @@ export default function SignupPage() {
const SignUpSchema = z.object({
email: z.string().email(),



});

type SignUp = z.infer<typeof SignUpSchema>;
Expand All @@ -26,33 +25,34 @@ export default function SignupPage() {

const { register, handleSubmit, reset, formState: { errors }, } = useForm<SignUp>({ resolver: zodResolver(SignUpSchema) });

const [submit_errors, setErrors] = useState("");
const [success, setSuccess] = useState("");
const [message, setMessage] = useState("");
const [buttonDisabled, setButtonDisabled] = useState(false)

const onSubmit = async (data: SignUp) => {
setButtonDisabled(true);
const resp = await Forgot(data.email);
setSuccess(resp.response);
setErrors(resp.error);
setMessage(resp);
setTimeout(() => { // wait 1 minutes between requests
setButtonDisabled(false);
}, 60000);
}


return (
<main className="flex items-center justify-center md:h-screen w-screen">
<form onSubmit={handleSubmit(onSubmit)} >
<main className="flex items-center justify-center h-screen w-screen">
<form onSubmit={handleSubmit(onSubmit)} className='bg-gradient-to-b from-offblack-100 to-[#453148] p-20 rounded-xl'>
<div className="w-full">
{(<p className="text-xs italic text-red-500 mt-2">{success}</p>)}
{(<p className="text-xs italic text-red-500 mt-2">{submit_errors}</p>)}
{(<p className="text-xs italic text-white mt-2">{message}</p>)}
<div>
<label
className="mb-3 mt-5 block text-xs font-medium text-gray-900"
className="mb-3 mt-5 block text-xs font-medium text-white"
htmlFor="email"
>
Email
</label>
<div className="relative">
<input
{...register("email")}
className="peer block w-full rounded-md border border-gray-200 py-[9px] pl-10 text-sm outline-2 placeholder:text-gray-500"
className="peer block w-96 rounded-md mb-4 border border-gray-200 py-[9px] pl-4 text-sm outline-2 placeholder:text-gray-500"
id="email"
type="email"
name="email"
Expand All @@ -62,10 +62,10 @@ export default function SignupPage() {
{errors.email && (<p className="text-xs italic text-red-500 mt-2">{errors.email?.message}</p>)}
</div>
</div>


</div>
<Button type="submit">Send Reset Link</Button>
<Button type="submit" disabled={buttonDisabled}>
{buttonDisabled ? "Please wait 1 minute between requests!" : "Send reset link"}
</Button>
</form>
</main>
);
Expand Down
35 changes: 13 additions & 22 deletions app/(pre-dashboard)/(entry)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,45 +27,35 @@ export default function LoginPage() {
type Login = z.infer<typeof LoginSchema>;

const [submit_errors, setErrors] = useState("");

const [loading, setLoading] = useState(false);
const router = useRouter();

const { register, handleSubmit, reset, formState: { errors }, } = useForm<Login>({ resolver: zodResolver(LoginSchema) });

const onSubmit = async (data: Login) => {
setLoading(true);
const resp = await authenticate(data.email, data.password);
setLoading(false);
setErrors(resp);
}

return (
<main className="flex items-center justify-center md:h-screen w-screen h-screen">
<Image
src={('/textbannerBROWN.png')}
width="900"
height="900"
alt="Scroll"
className={"h-[500px] w-[650px] sm:h-auto md:w-[650px] lg:w-[650px] xl:w-[650px] absolute"}
priority
style={{
objectFit: 'cover',
zIndex: -1
}}
/>
<form onSubmit={handleSubmit(onSubmit)} >
<form onSubmit={handleSubmit(onSubmit)} className='bg-gradient-to-b from-offblack-100 to-[#453148] p-20 rounded-xl'>
<div className="w-full grid gap-0 items-center">
{(<p className="text-xs italic text-red-500 mt-2">{submit_errors}</p>)}
<div>
<p className = "text-s italic text-grey-200">Press Login or Press Enter to Login</p>
<p className = "text-s italic text-white">Press Login or Press Enter to Login</p>
<label
className="mb-3 mt-5 block text-xs font-medium text-gray-900"
className="mb-3 mt-5 block text-xs font-medium text-white"
htmlFor="email"
>
Email
</label>
<div className="relative">
<input
{...register("email")}
className="peer block w-full rounded-md border border-gray-200 py-[9px] pl-10 text-sm outline-2 placeholder:text-gray-500"
className="peer block w-96 rounded-md border border-gray-200 py-[9px] pl-4 text-sm outline-2 placeholder:text-gray-500"
id="email"
type="email"
name="email"
Expand All @@ -77,15 +67,15 @@ export default function LoginPage() {
</div>
<div className="">
<label
className="mb-3 mt-5 block text-xs font-medium text-gray-900"
className="mb-3 mt-5 block text-xs font-medium text-white"
htmlFor="password"
>
Password
</label>
<div className="relative">
<input
{...register("password")}
className="peer block w-full rounded-md border border-gray-200 py-[9px] pl-10 text-sm outline-2 placeholder:text-gray-500"
className="peer block w-96 rounded-md border border-gray-200 py-[9px] pl-4 text-sm outline-2 placeholder:text-gray-500"
id="password"
type="password"
name="password"
Expand All @@ -95,9 +85,10 @@ export default function LoginPage() {
{errors.password && (<p className="text-xs italic text-red-500 mt-2">{errors.password?.message}</p>)}
</div>
</div>
<Button className="mt-4 justify-center" type="submit">Log in</Button>
<p className="text-s italic text-grey-500 mt-2 hover:text-blue-500 cursor-pointer" onClick={() => router.push('/signup')}>Not a member? Create an Account!</p>
<p className="text-s italic text-grey-500 mt-2 hover:text-blue-500 cursor-pointer" onClick={() => router.push('/forgot')}>Forgot Password? Reset it Here!</p>
<Button className="mt-4 justify-center" type="submit">
{loading ? 'Loading...' : 'Login'} </Button>
<p className="text-s italic text-white mt-2 hover:text-blue-500 cursor-pointer" onClick={() => router.push('/signup')}>Not a member? Create an Account!</p>
<p className="text-s italic text-white mt-2 hover:text-blue-500 cursor-pointer" onClick={() => router.push('/forgot')}>Forgot Password? Reset it Here!</p>
</div>
</form>
</main>
Expand Down
38 changes: 25 additions & 13 deletions app/(pre-dashboard)/(entry)/magic/[forgot]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { z } from 'zod';

import { useState } from "react";
import Image from 'next/image';

import { usePathname } from 'next/navigation'

Expand Down Expand Up @@ -47,28 +48,37 @@ export default function SignupPage() {
const resp = await Reset(data.email, data.password, data.confirm_password, arr[1]);

console.log(resp);
setSuccess(resp.response);
setErrors(resp.error);
}

if (resp.error) {
setErrors(resp.error);
setSuccess("");
} else {
setSuccess(resp.response);
setErrors("");
}

if (resp.error == "Password reset successful") { // for some reason this was showing up as an error
setSuccess(resp.error);
setErrors("");
}
};

return (
<main className="flex items-center justify-center md:h-screen w-screen">
<form onSubmit={handleSubmit(onSubmit)} >
<form onSubmit={handleSubmit(onSubmit)} className='bg-gradient-to-b from-offblack-100 to-[#453148] p-20 rounded-xl'>
<div className="w-full">
{(<p className="text-xs italic text-red-500 mt-2">{submit_errors}</p>)}
{(<p className="text-xs italic text-red-500 mt-2">{success}</p>)}
{(<p className="text-xs italic text-green-500 mt-2">{success}</p>)}
<div>
<label
className="mb-3 mt-5 block text-xs font-medium text-gray-900"
className="mb-3 mt-5 block text-xs font-medium text-white"
htmlFor="email"
>
Email
</label>
<div className="relative">
<input
{...register("email")}
className="peer block w-full rounded-md border border-gray-200 py-[9px] pl-10 text-sm outline-2 placeholder:text-gray-500"
className="peer block w-96 rounded-md border border-gray-200 py-[9px] pl-4 text-sm outline-2 placeholder:text-gray-500"
id="email"
type="email"
name="email"
Expand All @@ -81,16 +91,17 @@ export default function SignupPage() {

<div className="mt-4">
<label
className="mb-3 mt-5 block text-xs font-medium text-gray-900"
className="mb-3 mt-5 block text-xs font-medium text-white"
htmlFor="password"
>
Password
</label>
<div className="relative">
<input
{...register("password")}
className="peer block w-full rounded-md border border-gray-200 py-[9px] pl-10 text-sm outline-2 placeholder:text-gray-500"
className="peer block w-96 rounded-md border border-gray-200 py-[9px] pl-4 text-sm outline-2 placeholder:text-gray-500"
id="password"
type="password"
name="password"
placeholder="Enter password"
required
Expand All @@ -100,16 +111,17 @@ export default function SignupPage() {
</div>
<div className="mt-4">
<label
className="mb-3 mt-5 block text-xs font-medium text-gray-900"
className="mb-3 mt-5 block text-xs font-medium text-white"
htmlFor="confirm_password"
>
Confim Password
</label>
<div className="relative">
<input
{...register("confirm_password")}
className="peer block w-full rounded-md border border-gray-200 py-[9px] pl-10 text-sm outline-2 placeholder:text-gray-500"
className="peer block w-96 rounded-md mb-4 border border-gray-200 py-[9px] pl-4 text-sm outline-2 placeholder:text-gray-500"
id="confirm_password"
type="password"
name="confirm_password"
placeholder="Enter password again"
required
Expand All @@ -123,4 +135,4 @@ export default function SignupPage() {
</form>
</main>
);
}
}
Loading
Loading