🚚 (mv) separating card from other components
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import Login from "@/features/auth/ui/Login";
|
import Login from "@/features/auth/ui/cards/Login";
|
||||||
import SecurityCheckup from "@/shared/auth/ui/SecurityCheckup";
|
import SecurityCheckup from "@/shared/auth/ui/SecurityCheckup";
|
||||||
import SecurityCheckupFailed from "@/shared/auth/ui/SecurityCheckupFailed";
|
import SecurityCheckupFailed from "@/shared/auth/ui/SecurityCheckupFailed";
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import { redirect } from "next/navigation";
|
|||||||
import React, { JSX, useEffect, useState } from "react";
|
import React, { JSX, useEffect, useState } from "react";
|
||||||
import SecurityCheckup from "@/shared/auth/ui/SecurityCheckup";
|
import SecurityCheckup from "@/shared/auth/ui/SecurityCheckup";
|
||||||
import SecurityCheckupFailed from "@/shared/auth/ui/SecurityCheckupFailed";
|
import SecurityCheckupFailed from "@/shared/auth/ui/SecurityCheckupFailed";
|
||||||
import Signup from "../ui/Signup";
|
import Signup from "../ui/cards/Signup";
|
||||||
|
|
||||||
const SignupPage = () => {
|
const SignupPage = () => {
|
||||||
// State to set the current page component
|
// State to set the current page component
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import EmailInput from "./EmailInput";
|
|
||||||
import { Divider, Link } from "@heroui/react";
|
import { Divider, Link } from "@heroui/react";
|
||||||
import { routes } from "@/shared/config/routes";
|
import { routes } from "@/shared/config/routes";
|
||||||
import OAuthProviders from "./OAuthProviders";
|
import EmailInput from "../components/EmailInput";
|
||||||
|
import OAuthProviders from "../components/OAuthProviders";
|
||||||
|
|
||||||
const Login = () => {
|
const Login = () => {
|
||||||
return (
|
return (
|
||||||
@ -1,11 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import EmailInput from "./EmailInput";
|
import { Divider, Link } from "@heroui/react";
|
||||||
import { Button, Divider, Link } from "@heroui/react";
|
|
||||||
import { routes } from "@/shared/config/routes";
|
import { routes } from "@/shared/config/routes";
|
||||||
import OAuthProviders from "./OAuthProviders";
|
import OAuthProviders from "../components/OAuthProviders";
|
||||||
import DebugPage from "@/app/debug/DebugPage";
|
import FullNameInput from "../components/FullNameInput";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
changeCurrentPage: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
changeCurrentPage: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||||
@ -18,14 +17,7 @@ const Signup = ({ changeCurrentPage }: Props) => {
|
|||||||
|
|
||||||
{/* Email form */}
|
{/* Email form */}
|
||||||
<div className="mt-6 px-3">
|
<div className="mt-6 px-3">
|
||||||
<EmailInput />
|
<FullNameInput changeCurrentPage={changeCurrentPage} />
|
||||||
<Button
|
|
||||||
onPress={() => changeCurrentPage(<DebugPage />)}
|
|
||||||
className="mt-2 w-full"
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
For debug only
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Sign up link */}
|
{/* Sign up link */}
|
||||||
38
features/auth/ui/components/FullNameInput.tsx
Normal file
38
features/auth/ui/components/FullNameInput.tsx
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { Button, Input } from "@heroui/react";
|
||||||
|
import DebugPage from "@/app/debug/DebugPage";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
changeCurrentPage: React.Dispatch<React.SetStateAction<React.JSX.Element>>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const FullNameInput = ({ changeCurrentPage }: Props) => {
|
||||||
|
const [fullName, setFullName] = useState("");
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Input
|
||||||
|
className="w-full "
|
||||||
|
label="Full Name"
|
||||||
|
type="name"
|
||||||
|
variant="bordered"
|
||||||
|
onChange={(e) => setFullName(e.target.value)}
|
||||||
|
classNames={{
|
||||||
|
input: "text-md font-light pt-4",
|
||||||
|
inputWrapper: "flex gap-10",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
onPress={() => changeCurrentPage(<DebugPage />)}
|
||||||
|
className="mt-2 w-full"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
Continue
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default FullNameInput;
|
||||||
@ -1,13 +1,12 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { OauthProviders } from "../types/oauthProvidersList";
|
|
||||||
import { ResponseRequestOauthUrl } from "../types/responseRequestOauthUrl";
|
|
||||||
|
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
|
import { OauthProviders } from "../../types/oauthProvidersList";
|
||||||
|
import { ResponseRequestOauthUrl } from "../../types/responseRequestOauthUrl";
|
||||||
import { Button } from "@heroui/react";
|
import { Button } from "@heroui/react";
|
||||||
import { Icon } from "@iconify/react";
|
import { Icon } from "@iconify/react";
|
||||||
import getOauthProviderList from "../lib/getOauthProviderList";
|
import getOauthProviderList from "../../lib/getOauthProviderList";
|
||||||
import requestOauthUrl from "../lib/requestOauthUrl";
|
import requestOauthUrl from "../../lib/requestOauthUrl";
|
||||||
|
|
||||||
const OAuthProviders = () => {
|
const OAuthProviders = () => {
|
||||||
// Set initial state for OAuth providers list
|
// Set initial state for OAuth providers list
|
||||||
Reference in New Issue
Block a user