🚚 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:
@ -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;
|
|
||||||
@ -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;
|
|
||||||
@ -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;
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
import NavbarUI from "@/shared/ui/navbar";
|
import NavbarUI from "@/widgets/navbar/ui/Navbar";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
const mainLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
const mainLayout = ({ children }: Readonly<{ children: React.ReactNode }>) => {
|
||||||
|
|||||||
@ -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;
|
|
||||||
@ -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;
|
|
||||||
@ -2,6 +2,7 @@
|
|||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack",
|
"dev": "next dev --turbopack",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
|
|||||||
30
widgets/navbar/ui/LoginAndSignup.tsx
Normal file
30
widgets/navbar/ui/LoginAndSignup.tsx
Normal 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;
|
||||||
@ -1,7 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
Link,
|
Link,
|
||||||
Navbar,
|
Navbar,
|
||||||
NavbarBrand,
|
NavbarBrand,
|
||||||
@ -11,10 +10,10 @@ import {
|
|||||||
NavbarMenuItem,
|
NavbarMenuItem,
|
||||||
NavbarMenuToggle,
|
NavbarMenuToggle,
|
||||||
} from "@heroui/react";
|
} from "@heroui/react";
|
||||||
import { usePathname, useRouter } from "next/navigation";
|
import { usePathname } from "next/navigation";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { delayButtonClick } from "../lib/delayButtonClick";
|
import { routes } from "../../../shared/config/routes";
|
||||||
import { routes } from "../config/routes";
|
import LoginAndSignup from "./LoginAndSignup";
|
||||||
|
|
||||||
export const AcmeLogo = () => {
|
export const AcmeLogo = () => {
|
||||||
return (
|
return (
|
||||||
@ -86,24 +85,11 @@ const NavbarUI = () => {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</NavbarContent>
|
</NavbarContent>
|
||||||
|
|
||||||
<NavbarContent justify="end">
|
<NavbarContent justify="end">
|
||||||
<NavbarItem className="hidden lg:flex">
|
<LoginAndSignup />
|
||||||
<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>
|
|
||||||
</NavbarContent>
|
</NavbarContent>
|
||||||
|
|
||||||
<NavbarMenu>
|
<NavbarMenu>
|
||||||
{navbarItems.map((item, index) => (
|
{navbarItems.map((item, index) => (
|
||||||
<NavbarMenuItem key={`${item}-${index}`}>
|
<NavbarMenuItem key={`${item}-${index}`}>
|
||||||
Reference in New Issue
Block a user