fixed sliding gallery, fixed styling

This commit is contained in:
shafin-r
2025-07-04 02:49:17 +06:00
parent 17ebe63dfd
commit 576398883d
12 changed files with 99 additions and 89 deletions

View File

@ -76,7 +76,7 @@ const page = () => {
{error && <DestructibleAlert text={error} extraStyles="" />}
<button
onClick={() => router.push("/home")}
onClick={loginUser}
disabled={isLoading}
className="w-full h-14 flex justify-center items-center border border-[#113768] rounded-full bg-transparent hover:bg-[#113768] hover:text-white transition-colors duration-200 disabled:opacity-50 disabled:cursor-not-allowed"
>

View File

@ -89,57 +89,52 @@ export default function RegisterPage() {
<FormField
title="Full name"
value={form.name}
handleChangeText={(e) =>
setForm({ ...form, name: e.target.value })
}
handleChangeText={(value) => setForm({ ...form, name: value })}
/>
<FormField
title="Institution"
placeholder="Enter a institution"
value={form.institution}
handleChangeText={(e) =>
setForm({ ...form, institution: e.target.value })
handleChangeText={(value) =>
setForm({ ...form, institution: value })
}
/>
<FormField
title="SSC Roll No."
placeholder="Enter your SSC Roll No."
value={form.sscRoll}
handleChangeText={(e) =>
setForm({ ...form, sscRoll: e.target.value })
handleChangeText={(value) =>
setForm({ ...form, sscRoll: value })
}
/>
<FormField
title="HSC Roll No."
placeholder="Enter your HSC Roll No."
value={form.hscRoll}
handleChangeText={(e) =>
setForm({ ...form, hscRoll: e.target.value })
handleChangeText={(value) =>
setForm({ ...form, hscRoll: value })
}
/>
<FormField
title="Email Address"
placeholder="Enter your email address..."
value={form.email}
handleChangeText={(e) =>
setForm({ ...form, email: e.target.value })
}
handleChangeText={(value) => setForm({ ...form, email: value })}
/>
<FormField
title="Phone Number"
placeholder="Enter your phone number.."
value={form.phone}
handleChangeText={(e) =>
setForm({ ...form, phone: e.target.value })
}
handleChangeText={(value) => setForm({ ...form, phone: value })}
/>
<FormField
title="Password"
placeholder="Enter a password"
value={form.password}
handleChangeText={(e) =>
setForm({ ...form, password: e.target.value })
handleChangeText={(value) =>
setForm({ ...form, password: value })
}
placeholder={undefined}
/>
</div>

View File

@ -92,8 +92,8 @@ const page = () => {
<Image
src="/images/icons/topic-test.png"
alt="Topic Test"
width={70}
height={70}
width={85}
height={85}
/>
<span className={styles.categoryButtonText}>
Topic Test
@ -106,8 +106,8 @@ const page = () => {
<Image
src="/images/icons/mock-test.png"
alt="Mock Test"
width={70}
height={70}
width={85}
height={85}
/>
<span className={styles.categoryButtonText}>
Mock Test
@ -122,8 +122,8 @@ const page = () => {
<Image
src="/images/icons/past-paper.png"
alt="Past Papers"
width={62}
height={62}
width={68}
height={68}
/>
<span className={styles.categoryButtonText}>
Past Papers
@ -136,8 +136,8 @@ const page = () => {
<Image
src="/images/icons/subject-test.png"
alt="Subject Test"
width={70}
height={70}
width={80}
height={80}
/>
<span className={styles.categoryButtonText}>
Subject Test

View File

@ -5,11 +5,13 @@ import Link from "next/link";
import { ReactNode } from "react";
import { usePathname } from "next/navigation";
import clsx from "clsx";
import { House, LayoutGrid, Bookmark, CircleUser } from "lucide-react";
const tabs = [
{ name: "Home", href: "/tabs/home" },
{ name: "Profile", href: "/tabs/profile" },
{ name: "Leaderboard", href: "/tabs/leaderboard" },
{ name: "Home", href: "/home", component: <House size={30} /> },
{ name: "Unit", href: "/unit", component: <LayoutGrid size={30} /> },
{ name: "Bookmark", href: "/bookmark", component: <Bookmark size={30} /> },
{ name: "Profile", href: "/profile", component: <CircleUser size={30} /> },
];
export default function TabsLayout({ children }: { children: ReactNode }) {
@ -19,7 +21,7 @@ export default function TabsLayout({ children }: { children: ReactNode }) {
<div className="min-h-screen flex flex-col">
<main className="flex-1">{children}</main>
<nav className="flex justify-around border-t p-4 bg-white">
<nav className="h-[70px] flex justify-around items-center border-t border-t-neutral-400 p-4 rounded-t-4xl bg-white">
{tabs.map((tab) => (
<Link
key={tab.name}
@ -29,7 +31,7 @@ export default function TabsLayout({ children }: { children: ReactNode }) {
pathname === tab.href ? "text-blue-600" : "text-gray-500"
)}
>
{tab.name}
{tab.component}
</Link>
))}
</nav>

View File

@ -28,10 +28,6 @@ export default function Home() {
return () => window.removeEventListener("resize", handleResize);
}, []);
const handleLogin = () => {
router.push("/login");
};
return (
<BackgroundWrapper>
<div className="mx-10 h-screen">
@ -62,7 +58,7 @@ export default function Home() {
{/* Action Buttons */}
<div className="flex flex-col gap-4">
<button
onClick={handleLogin}
onClick={() => router.push("/login")}
className="w-full h-[60px] flex justify-center items-center border border-[#113768] rounded-full bg-transparent hover:bg-[#113768] hover:text-white transition-colors duration-200"
>
<span