From 2770f10747fdcbfb83ca174a0ab8ea753b0e5e03 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Mon, 14 Jul 2025 14:52:50 +0700 Subject: [PATCH] :triangular_flag_on_post: (login) create login page --- app/(clear)/login/page.tsx | 17 ++++++--- bun.lock | 5 +++ package.json | 1 + widgets/login/card.tsx | 32 ---------------- .../login/loginCard/ContinueWithProviders.tsx | 29 +++++++++++++++ widgets/login/loginCard/EmailForm.tsx | 25 +++++++++++++ widgets/login/loginCard/Index.tsx | 37 +++++++++++++++++++ 7 files changed, 108 insertions(+), 38 deletions(-) delete mode 100644 widgets/login/card.tsx create mode 100644 widgets/login/loginCard/ContinueWithProviders.tsx create mode 100644 widgets/login/loginCard/EmailForm.tsx create mode 100644 widgets/login/loginCard/Index.tsx diff --git a/app/(clear)/login/page.tsx b/app/(clear)/login/page.tsx index 4758561..dec8a19 100644 --- a/app/(clear)/login/page.tsx +++ b/app/(clear)/login/page.tsx @@ -1,14 +1,19 @@ -import LoginCard from "@/widgets/login/card"; +import LoginCard from "@/widgets/login/loginCard/Index"; import React from "react"; const page = () => { return ( -
-
-
- + <> + {/* Fixed background overlay */} +
+ {/* Fixed background overlay */} +
+ {/* Login card centered on the screen */} +
+ +
-
+ ); }; diff --git a/bun.lock b/bun.lock index 22ab1c3..3adee64 100644 --- a/bun.lock +++ b/bun.lock @@ -5,6 +5,7 @@ "name": "frontend", "dependencies": { "@heroui/react": "^2.7.11", + "@iconify/react": "^6.0.0", "commitizen": "^4.3.1", "cz-emoji": "^1.3.2-canary.2", "framer-motion": "^12.23.3", @@ -238,6 +239,10 @@ "@humanwhocodes/retry": ["@humanwhocodes/retry@0.4.3", "", {}, "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ=="], + "@iconify/react": ["@iconify/react@6.0.0", "", { "dependencies": { "@iconify/types": "^2.0.0" }, "peerDependencies": { "react": ">=16" } }, "sha512-eqNscABVZS8eCpZLU/L5F5UokMS9mnCf56iS1nM9YYHdH8ZxqZL9zyjSwW60IOQFsXZkilbBiv+1paMXBhSQnw=="], + + "@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="], + "@img/sharp-darwin-arm64": ["@img/sharp-darwin-arm64@0.34.3", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-arm64": "1.2.0" }, "os": "darwin", "cpu": "arm64" }, "sha512-ryFMfvxxpQRsgZJqBd4wsttYQbCxsJksrv9Lw/v798JcQ8+w84mBWuXwl+TT0WJ/WrYOLaYpwQXi3sA9nTIaIg=="], "@img/sharp-darwin-x64": ["@img/sharp-darwin-x64@0.34.3", "", { "optionalDependencies": { "@img/sharp-libvips-darwin-x64": "1.2.0" }, "os": "darwin", "cpu": "x64" }, "sha512-yHpJYynROAj12TA6qil58hmPmAwxKKC7reUqtGLzsOHfP7/rniNGTL8tjWX6L3CTV4+5P4ypcS7Pp+7OB+8ihA=="], diff --git a/package.json b/package.json index 37d0b0e..cc24472 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ }, "dependencies": { "@heroui/react": "^2.7.11", + "@iconify/react": "^6.0.0", "commitizen": "^4.3.1", "cz-emoji": "^1.3.2-canary.2", "framer-motion": "^12.23.3", diff --git a/widgets/login/card.tsx b/widgets/login/card.tsx deleted file mode 100644 index 62c6b20..0000000 --- a/widgets/login/card.tsx +++ /dev/null @@ -1,32 +0,0 @@ -"use client"; - -import React from "react"; -import { Button, Card, Divider, input, Input } from "@heroui/react"; - -const LoginCard = () => { - return ( - -

Welcome Back

- - -
- - or - -
-
- ); -}; - -export default LoginCard; diff --git a/widgets/login/loginCard/ContinueWithProviders.tsx b/widgets/login/loginCard/ContinueWithProviders.tsx new file mode 100644 index 0000000..6e9061c --- /dev/null +++ b/widgets/login/loginCard/ContinueWithProviders.tsx @@ -0,0 +1,29 @@ +import { Button } from "@heroui/react"; +import { Icon } from "@iconify/react"; +import React from "react"; + +const ContinueWithProviders = () => { + return ( +
+ + + +
+ ); +}; + +export default ContinueWithProviders; diff --git a/widgets/login/loginCard/EmailForm.tsx b/widgets/login/loginCard/EmailForm.tsx new file mode 100644 index 0000000..6b673b2 --- /dev/null +++ b/widgets/login/loginCard/EmailForm.tsx @@ -0,0 +1,25 @@ +import { Button, Form, Input } from "@heroui/react"; +import React from "react"; + +const EmailForm = () => { + return ( + // Form component to handle email input +
+ + +
+ ); +}; + +export default EmailForm; diff --git a/widgets/login/loginCard/Index.tsx b/widgets/login/loginCard/Index.tsx new file mode 100644 index 0000000..f14b622 --- /dev/null +++ b/widgets/login/loginCard/Index.tsx @@ -0,0 +1,37 @@ +"use client"; + +import { Card, Divider, Link } from "@heroui/react"; +import React from "react"; +import EmailForm from "./EmailForm"; +import ContinueWithProviders from "./ContinueWithProviders"; + +const LoginCard = () => { + return ( + +

Welcome Back

+ + {/* Email form */} + + + {/* Sign up link */} +

+ Don't have an account?{" "} + + Sign Up + +

+ + {/* Divider between email form and third-party login options */} +
+ + or + +
+ + {/* Buttons for third-party login options */} + +
+ ); +}; + +export default LoginCard;