Skip to content

Dev #287

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

Merged
merged 54 commits into from
Jun 14, 2025
Merged

Dev #287

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
55f4f83
added GetAllUsers to api
RyamL1221 Mar 5, 2025
8f4f5d8
leaderboard style changes
yoge1212 Apr 2, 2025
7efd015
updated teamsubmitschema to have better email validation and add stat…
Hetp29 Apr 7, 2025
8c4e61a
added layouts
yoge1212 Apr 14, 2025
79a977e
Update page.tsx
bryanshangguan Apr 14, 2025
f57418f
added email validation for team members
Hetp29 Apr 14, 2025
be4bd35
layout fixes
yoge1212 Apr 15, 2025
5518165
Merge pull request #271 from HackRU/image-optimization
avsomers25 Apr 15, 2025
887701f
statusbar
rishdhingra Apr 15, 2025
6009881
statusbar
rishdhingra Apr 15, 2025
b721c2b
Update page.tsx
avsomers25 Apr 15, 2025
16be291
centralized layout file
yoge1212 Apr 15, 2025
7d59efe
Merge branch 'statusbar' of github.com:HackRU/frontendv2 into statusbar
rishdhingra Apr 15, 2025
c892da9
statusbar
rishdhingra Apr 15, 2025
c773fee
statusbar
rishdhingra Apr 15, 2025
48f496a
Update StatusBar.tsx
avsomers25 Apr 22, 2025
149132e
Merge pull request #273 from HackRU/statusbar
avsomers25 Apr 22, 2025
eade320
format changes
yoge1212 Apr 28, 2025
38b134f
updated validateEmail to check if email exists in database and displa…
Hetp29 Apr 29, 2025
8f25bc5
successfully added fetching all users and displaying them in the dash…
RyamL1221 May 6, 2025
8531eb5
added delete function to frontend api
RyamL1221 May 9, 2025
76c0672
Added functionality for delete button
RyamL1221 May 9, 2025
adbc3a3
fixed delete in frontend api
RyamL1221 May 15, 2025
7939349
created delete function
RyamL1221 May 15, 2025
6c112aa
added new modal
RyamL1221 May 15, 2025
abb452b
added modal and styling, working on functionality
RyamL1221 May 15, 2025
c190440
fixed frontend api
RyamL1221 May 15, 2025
a5fb796
fixed error
RyamL1221 May 15, 2025
f3466d5
fixed eslint errors
RyamL1221 May 16, 2025
0bbf8e8
fixed admin dashboard crashing
RyamL1221 May 16, 2025
15b762f
edit has functionality and refreshes on success
RyamL1221 May 16, 2025
a799fd6
Merge pull request #276 from HackRU/admin-dashboard
avsomers25 May 22, 2025
95b444c
Merge branch 'dev' into 258-styling-overhaul-linking-various-sub-pages
avsomers25 May 22, 2025
9836c30
Update directorView.tsx
avsomers25 May 22, 2025
e71cd11
Merge pull request #274 from HackRU/258-styling-overhaul-linking-vari…
avsomers25 May 22, 2025
d5ec1c8
integration with endpoint
avsomers25 May 23, 2025
c5ad897
Merge branch 'dev' into team-functionality
avsomers25 May 23, 2025
3cff5b9
Merge pull request #275 from HackRU/team-functionality
avsomers25 May 23, 2025
9deb079
changing dates
avsomers25 May 23, 2025
499cda7
Added: Interest Forms page component. Refrence said component in the …
Ayoobf Jun 5, 2025
e6aa692
Refactored: Took out direct api call from InterestForm component and …
Ayoobf Jun 7, 2025
cd9b220
Ran prettier
Ayoobf Jun 7, 2025
feb89e1
Renamed React component to match standard
Ayoobf Jun 7, 2025
770be08
Renamed React component to match standard
Ayoobf Jun 7, 2025
fa44c69
Merge pull request #281 from HackRU/interest-form
avsomers25 Jun 8, 2025
41772eb
Commented the custom cursor out.
Ayoobf Jun 9, 2025
cc585cd
Added the new HackRU dates (fall 2025)
Ayoobf Jun 9, 2025
3c85585
Changed to generic logo
siyagoyal Jun 10, 2025
6dc6665
Merge pull request #285 from HackRU/283-simple-fixes-siya
Ayoobf Jun 10, 2025
26902cb
Merge pull request #284 from HackRU/282-simple-fixes-ayoob
Ayoobf Jun 10, 2025
424ea6b
Merge pull request #286 from HackRU/277-simple-fixes
avsomers25 Jun 12, 2025
ac629de
Update Navbar.tsx
avsomers25 Jun 12, 2025
6b541bd
Merge branch 'dev' of https://github.com/HackRU/frontendv2 into dev
avsomers25 Jun 12, 2025
02a513a
Update Navbar.tsx
avsomers25 Jun 14, 2025
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ next-env.d.ts

# pnpm
pnpm-lock.yaml

.env.example
58 changes: 36 additions & 22 deletions app/(pre-dashboard)/(entry)/forgot/page.tsx
Original file line number Diff line number Diff line change
@@ -1,70 +1,84 @@
"use client"
'use client';

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


import { Forgot } from '../../../lib/actions';

import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';

import { useState } from "react";
import { useState } from 'react';

export default function SignupPage() {

const SignUpSchema = z.object({
email: z.string().email(),

});

type SignUp = z.infer<typeof SignUpSchema>;

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


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

const [message, setMessage] = useState("");
const [buttonDisabled, setButtonDisabled] = useState(false)
const [message, setMessage] = useState('');
const [buttonDisabled, setButtonDisabled] = useState(false);

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

return (
<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'>
<main className="flex h-screen w-screen items-center justify-center">
<form
onSubmit={handleSubmit(onSubmit)}
className="rounded-xl bg-gradient-to-b from-[var(--bg-color)] to-[var(--bg-color2)] p-20"
>
<div className="w-full">
{(<p className="text-xs italic text-white mt-2">{message}</p>)}
{
<p className="mt-2 text-xs italic text-[var(--mainText-color)]">
{message}
</p>
}
<div>
<label
className="mb-3 mt-5 block text-xs font-medium text-white"
className="mb-3 mt-5 block text-xs font-medium text-[var(--mainText-color)] "
htmlFor="email"
>
Email
</label>
<div className="relative">
<input
{...register("email")}
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"
{...register('email')}
className="peer mb-4 block w-96 rounded-md border border-[var(--border-color)] py-[9px] pl-4 text-sm outline-2 placeholder:text-[var(--placeholder-color)] "
id="email"
type="email"
name="email"
placeholder="Enter your email address"
required
/>
{errors.email && (<p className="text-xs italic text-red-500 mt-2">{errors.email?.message}</p>)}
{errors.email && (
<p className="mt-2 text-xs italic text-[var(--error-color)]">
{errors.email?.message}
</p>
)}
</div>
</div>
</div>
<Button type="submit" disabled={buttonDisabled}>
{buttonDisabled ? "Please wait 1 minute between requests!" : "Send reset link"}
{buttonDisabled
? 'Please wait 1 minute between requests!'
: 'Send reset link'}
</Button>
</form>
</main>
Expand Down
19 changes: 16 additions & 3 deletions app/(pre-dashboard)/(entry)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
import { Suspense } from 'react';

export default function Layout({ children }: { children: React.ReactNode }) {
return (
<>
<main className="relative h-fit w-fit">
<main
className="h-fit w-fit "
style={
{
'--bg-color': '#172335',
'--bg-color2': '#453148',
'--mainText-color': '#FFFFFF',
'--border-color': '#e5e7eb',
'--placeholder-color': '#6b7280',
'--error-color': '#ef4444',
'--success-color': '#ef4444',
'--hover-color': '#141719',
backgroundImage: 'url("/backgrounds/hero.jpg")',
} as React.CSSProperties
}
>
{children}
<div id="entry-radial" className="absolute top-0 -z-10 h-full w-full" />
</main>
Expand Down
84 changes: 57 additions & 27 deletions app/(pre-dashboard)/(entry)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
"use client"
'use client';

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

import { authenticate, authUser } from '../../../lib/actions';

import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';

import { Suspense, useState } from "react";
import { Suspense, useState } from 'react';

import Image from 'next/image';
import { useRouter } from 'next/navigation'
import { useRouter } from 'next/navigation';
import Cursor from '../../../ui/cursor';


export default function LoginPage() {


const LoginSchema = z.object({
email: z.string().email(),
//email :z.string(),
Expand All @@ -26,69 +23,102 @@ export default function LoginPage() {

type Login = z.infer<typeof LoginSchema>;

const [submit_errors, setErrors] = useState("");
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 {
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">
<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>)}
<main className="flex h-screen w-screen items-center justify-center md:h-screen">
<form
onSubmit={handleSubmit(onSubmit)}
className="rounded-xl bg-gradient-to-b from-[var(--bg-color)] to-[var(--bg-color2)] p-20"
>
<div className="grid w-full items-center gap-0">
{
<p className="mt-2 text-xs italic text-[var(--error-color)]">
{submit_errors}
</p>
}
<div>
<p className = "text-s italic text-white">Press Login or Press Enter to Login</p>
<p className="text-s italic text-[var(--mainText-color)]">
Press Login or Press Enter to Login
</p>
<label
className="mb-3 mt-5 block text-xs font-medium text-white"
className="mb-3 mt-5 block text-xs font-medium text-[var(--mainText-color)]"
htmlFor="email"
>
Email
</label>
<div className="relative">
<input
{...register("email")}
className="peer block w-96 rounded-md border border-gray-200 py-[9px] pl-4 text-sm outline-2 placeholder:text-gray-500"
{...register('email')}
className="border-var(--border-color)] peer block w-96 rounded-md border py-[9px] pl-4 text-sm outline-2 placeholder:text-[var(--placeholder-color)]"
id="email"
type="email"
name="email"
placeholder="Enter your email address"
required
/>
</div>
{errors.email && (<p className="text-xs italic text-red-500 mt-2">{errors.email?.message}</p>)}
{errors.email && (
<p className="mt-2 text-xs italic text-[var(--error-color)]">
{errors.email?.message}
</p>
)}
</div>
<div className="">
<label
className="mb-3 mt-5 block text-xs font-medium text-white"
className="mb-3 mt-5 block text-xs font-medium text-[var(--mainText-color)]"
htmlFor="password"
>
Password
</label>
<div className="relative">
<input
{...register("password")}
className="peer block w-96 rounded-md border border-gray-200 py-[9px] pl-4 text-sm outline-2 placeholder:text-gray-500"
{...register('password')}
className="peer block w-96 rounded-md border border-[var(--border-color)] py-[9px] pl-4 text-sm outline-2 placeholder:text-[var(--placeholder-color)]"
id="password"
type="password"
name="password"
placeholder="Enter password"
required
/>
{errors.password && (<p className="text-xs italic text-red-500 mt-2">{errors.password?.message}</p>)}
{errors.password && (
<p className="mt-2 text-xs italic text-[var(--error-color)]">
{errors.password?.message}
</p>
)}
</div>
</div>
<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>
{loading ? 'Loading...' : 'Login'}{' '}
</Button>
<p
className="text-s mt-2 cursor-pointer italic text-[var(--mainText-color)] hover:text-[var(--hover-color)]"
onClick={() => router.push('/signup')}
>
Not a member? Create an Account!
</p>
<p
className="text-s mt-2 italic text-[var(--mainText-color)] hover:text-[var(--hover-color)]"
onClick={() => router.push('/forgot')}
>
Forgot Password? Reset it Here!
</p>
</div>
</form>
</main>
Expand Down
Loading