From 77a04a78fafdd00510bb0c1aeacf9991de14f247 Mon Sep 17 00:00:00 2001 From: Ali Ebrahimi kashef Date: Fri, 16 May 2025 16:11:10 +0330 Subject: [PATCH 1/2] refactor(become-auther): simplify layout and update UI components - Remove background image and gradient from AutherLayout - Update form layout and styling in AutherForm - Add Typography and Image components to enhance UI --- .../become-auther/_components/auther-form.tsx | 169 ++++++++---------- 1 file changed, 73 insertions(+), 96 deletions(-) diff --git a/apps/core/app/(landing)/become-auther/_components/auther-form.tsx b/apps/core/app/(landing)/become-auther/_components/auther-form.tsx index dbaad5c..77a3428 100644 --- a/apps/core/app/(landing)/become-auther/_components/auther-form.tsx +++ b/apps/core/app/(landing)/become-auther/_components/auther-form.tsx @@ -1,9 +1,9 @@ "use client"; import { zodResolver } from "@hookform/resolvers/zod"; -import { postBecomeAutherSchema } from "@repo/apis/core/accounts/request-author/post/post-become-auther.schema"; -import { PostBecomeAutherRequest } from "@repo/apis/core/accounts/request-author/post/post-become-auther.types"; -import { usePostBecomeAuther } from "@repo/apis/core/accounts/request-author/post/use-post-become-auther"; -import { Button, Typography } from "@repo/ui/components"; +import { postRequestAuthorSchema } from "@repo/apis/core/api/request-author/post/post-request-author.schema"; +import { PostRequestAuthorRequest } from "@repo/apis/core/api/request-author/post/post-request-author.types"; +import { UsePostRequestAuthor } from "@repo/apis/core/api/request-author/post/use-post-request-author"; +import { Button } from "@repo/ui/components"; import { Input } from "@repo/ui/components"; import { Label } from "@repo/ui/components"; import { Textarea } from "@repo/ui/components"; @@ -11,8 +11,6 @@ import { useState } from "react"; import { useForm } from "react-hook-form"; import { AutherLayout } from "./auther-layout"; import AutherResult from "./auther-result"; -import Image from "next/image"; -import BecomeAnAuthorimage from "../../_assets/become-auther.svg"; const AutherForm = () => { const [isSubmitted, setIsSubmitted] = useState(false); @@ -33,8 +31,8 @@ const AutherForm = () => { }, }); - const onSubmit = (data: PostBecomeAutherRequest) => { - console.log("data", data); + const onSubmit = (data: PostRequestAuthorRequest) => { + mutation.mutate(data); }; @@ -43,98 +41,77 @@ const AutherForm = () => { {isSubmitted ? ( // Show result form after submission ) : ( - -
+ +
+

Become an Author

+

+ Join the talented community of designers at PixelGenius by + invitation or by submitting your application using the form below. +

+
+
+

Apply to Open a Shop

-
- - Become an Author - - - Join the talented community of designers at PixelGenius by - invitation or by submitting your application using the form - below. - -
- -
- -
-
- - -
-
- -
-
- -
-
- -