From 58904a35e6b502469ad274f567a1550644bdd85d Mon Sep 17 00:00:00 2001 From: Puskar-Roy Date: Sun, 14 Jul 2024 16:18:28 +0530 Subject: [PATCH 1/2] feat : profile set --- apps/frontend/src/App.tsx | 2 + apps/frontend/src/components/ProfileSetup.tsx | 211 ++++++++++++++++++ 2 files changed, 213 insertions(+) create mode 100644 apps/frontend/src/components/ProfileSetup.tsx diff --git a/apps/frontend/src/App.tsx b/apps/frontend/src/App.tsx index 025989c..197eaa2 100644 --- a/apps/frontend/src/App.tsx +++ b/apps/frontend/src/App.tsx @@ -2,6 +2,7 @@ import { Route, Routes } from "react-router-dom"; import Home from "./components/Home"; import Navbar from "./components/Navbar"; import Login from "./components/Login"; +import ProfileSetup from "./components/ProfileSetup"; function App() { @@ -14,6 +15,7 @@ function App() { element={} /> } /> + }/> diff --git a/apps/frontend/src/components/ProfileSetup.tsx b/apps/frontend/src/components/ProfileSetup.tsx new file mode 100644 index 0000000..c6e5139 --- /dev/null +++ b/apps/frontend/src/components/ProfileSetup.tsx @@ -0,0 +1,211 @@ +import React, { useState, ChangeEvent, FormEvent } from 'react'; + + + +interface FormData { + companyName: string; + companyMail: string; + companyWebsite: string; + companyAddress: string; + location: string; + description: string; + logo: File | null; + } + +const ProfileSetup = () => { + const [formData, setFormData] = useState({ + companyName: '', + companyMail: '', + companyWebsite: '', + companyAddress: '', + location: '', + description: '', + logo: null, + }); + + const handleInputChange = (e: ChangeEvent) => { + const { name, value } = e.target; + setFormData({ ...formData, [name]: value }); + }; + + const handleFileChange = (e: ChangeEvent) => { + const file = e.target.files ? e.target.files[0] : null; + setFormData({ ...formData, logo: file }); + }; + + const handleSubmit = (e: FormEvent) => { + e.preventDefault(); + // Handle form submission + console.log(formData); + }; + + return ( +
+
+
+
+
+
+

Profile Setup

+
+
+
+
+
+ +
+
+ {formData.logo && ( + Avatar Upload + )} +
+ +
+
+
+
+ + +
+
+ + +
+
+
+ +
+
+ + + + + +
+ +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+
+
+
+
+ ); +}; + +export default ProfileSetup; \ No newline at end of file From 0d41a763c7c34e2b030abb2cf4f07f6d0047a24c Mon Sep 17 00:00:00 2001 From: Puskar-Roy Date: Sun, 14 Jul 2024 16:22:22 +0530 Subject: [PATCH 2/2] feat : profile socials --- apps/frontend/src/components/ProfileSetup.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/frontend/src/components/ProfileSetup.tsx b/apps/frontend/src/components/ProfileSetup.tsx index c6e5139..8d102f6 100644 --- a/apps/frontend/src/components/ProfileSetup.tsx +++ b/apps/frontend/src/components/ProfileSetup.tsx @@ -110,7 +110,7 @@ const ProfileSetup = () => {
- +