🚚 reconstructing and fixing file structures

The reconstruction includes moving the Navbar component from shared to widget because Navbar is a group of elements, and
removing the login-signup form due to changes in logic that will use a popup flow to improve the user experience without
navigating to another page for authentication.
This commit is contained in:
2025-08-17 21:25:49 +07:00
parent 3dad8ef528
commit b12a3211b6
11 changed files with 38 additions and 123 deletions

View File

@ -1,12 +0,0 @@
import React from "react";
const clearLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
return (
<div className="relative w-screen h-screen bg-red-500 bg-[url('/assets/pages/login/a78h12j89a01n.jpg')] bg-cover bg-center">
<div className="fixed z-0 w-screen h-screen backdrop-blur-xl bg-black/60" />
{children}
</div>
);
};
export default clearLayout;

View File

@ -1,19 +0,0 @@
import { buildMeta } from "@/shared/config/meta";
import LoginCard from "@/widgets/authentication/login/LoginCard";
import React from "react";
export const generateMetadata = () => {
return buildMeta({
title: "Log in",
});
};
const page = () => {
return (
<div className="fixed z-10 w-screen h-screen flex justify-center items-center -mt-12">
<LoginCard />
</div>
);
};
export default page;

View File

@ -1,19 +0,0 @@
import { buildMeta } from "@/shared/config/meta";
import SignupCard from "@/widgets/authentication/signup/SignupCard";
import React from "react";
export const generateMetadata = () => {
return buildMeta({
title: "Sign in",
});
};
const page = () => {
return (
<div className="fixed z-10 w-screen h-screen flex justify-center items-center -mt-12">
<SignupCard />
</div>
);
};
export default page;

View File

@ -1,4 +1,4 @@
import NavbarUI from "@/shared/ui/navbar";
import NavbarUI from "@/widgets/navbar/ui/Navbar";
import React from "react";
const mainLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {

View File

@ -1,27 +0,0 @@
"use client";
import { Button, Form, Input } from "@heroui/react";
import React from "react";
const EmailForm = () => {
return (
// Form component to handle email input
<Form className="mt-12 sm:mt-8">
<Input
className="w-full "
label="Email"
type="email"
variant="bordered"
classNames={{
input: "text-md font-light pt-4",
inputWrapper: "flex gap-10",
}}
/>
<Button className="mt-2 w-full" color="primary">
Continue
</Button>
</Form>
);
};
export default EmailForm;

View File

@ -1,25 +0,0 @@
import { Button, Form, Input } from "@heroui/react";
import React from "react";
const EmailForm = () => {
return (
// Form component to handle email input
<Form className="mt-12 sm:mt-8">
<Input
className="w-full "
label="Email"
type="email"
variant="bordered"
classNames={{
input: "text-md font-light pt-4",
inputWrapper: "flex gap-10",
}}
/>
<Button className="mt-2 w-full" color="primary">
Continue
</Button>
</Form>
);
};
export default EmailForm;

View File

@ -2,6 +2,7 @@
"name": "frontend",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev --turbopack",
"build": "next build",

View File

@ -0,0 +1,30 @@
"use client";
import { routes } from "@/shared/config/routes";
import { Button, Link, NavbarItem } from "@heroui/react";
import React from "react";
const LoginAndSignup = () => {
return (
<>
<NavbarItem className="hidden lg:flex">
<Link href={routes.login} className="font-medium">
Login
</Link>
</NavbarItem>
<NavbarItem>
<Button
color="primary"
variant="solid"
radius="sm"
as={Link}
href={routes.signup}
>
Sign Up
</Button>
</NavbarItem>
</>
);
};
export default LoginAndSignup;

View File

@ -1,7 +1,6 @@
"use client";
import {
Button,
Link,
Navbar,
NavbarBrand,
@ -11,10 +10,10 @@ import {
NavbarMenuItem,
NavbarMenuToggle,
} from "@heroui/react";
import { usePathname, useRouter } from "next/navigation";
import { usePathname } from "next/navigation";
import React, { useState } from "react";
import { delayButtonClick } from "../lib/delayButtonClick";
import { routes } from "../config/routes";
import { routes } from "../../../shared/config/routes";
import LoginAndSignup from "./LoginAndSignup";
export const AcmeLogo = () => {
return (
@ -86,24 +85,11 @@ const NavbarUI = () => {
);
})}
</NavbarContent>
<NavbarContent justify="end">
<NavbarItem className="hidden lg:flex">
<Link href={routes.login} className="font-medium">
Login
</Link>
</NavbarItem>
<NavbarItem>
<Button
color="primary"
variant="solid"
radius="sm"
as={Link}
href={routes.signup}
>
Sign Up
</Button>
</NavbarItem>
<LoginAndSignup />
</NavbarContent>
<NavbarMenu>
{navbarItems.map((item, index) => (
<NavbarMenuItem key={`${item}-${index}`}>