Skip to content

Commit

Permalink
Marketplace dashboard UI fix, userprofile topbar redesign and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KrownWealth committed Feb 25, 2024
1 parent 0507ed0 commit c1c5159
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 40 deletions.
11 changes: 4 additions & 7 deletions cubeseed_login/app/(farmer)/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@ import "@/styles/global.css"
import MarketPlaceSideBar from "@/component/dashboard/MarketPlaceProfile/MarketplaceSidebar"
import ShopHeader from "@/component/dashboard/MarketPlaceShop/ShopHeader"
import styles from "@/styles/marketplaceshop.module.css"
import HorizontalRule from "@/component/dashboard/MarketPlaceProfile/horizontalRule"
import HorizontalRule from "@/component/dashboard/MarketPlaceProfile/HorizontalRule"
import TinyFooter from "@/component/dashboard/MarketPlaceShop/TinyFooter"

interface ShopLayoutProps {
interface LayoutProps {
children: ReactNode
sideBarOpenContainer: boolean
}

const ShopLayout: React.FC<ShopLayoutProps> = ({
children,
sideBarOpenContainer,
}) => {
const Layout: React.FC<LayoutProps> = ({ children, sideBarOpenContainer }) => {
return (
<div className={styles.container}>
<MarketPlaceSideBar sideBarOpenContainer={sideBarOpenContainer} />
Expand All @@ -33,4 +30,4 @@ const ShopLayout: React.FC<ShopLayoutProps> = ({
)
}

export default ShopLayout
export default Layout
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@ import useProfile from "./hooks/useProfile"
import { Input } from "@cs/stories/Input"
import useProfilePhoto from "./hooks/useProfilePhoto"
import ProfileLinks from "./ProfileIdLinks"
import HorizontalRule from "./horizontalRule"
import HorizontalRule from "./HorizontalRule"

const PersonalDetailForm: React.FC = () => {
interface PersonalDetailFormProps {
sideBarOpenContainer: boolean
}

const PersonalDetailForm: React.FC<PersonalDetailFormProps> = ({
sideBarOpenContainer,
}) => {
const { errors, formData, handleUserInputs, handleSubmit } = useProfile()
const { uploading, selectedImage, handleFileChange, error } =
useProfilePhoto()

return (
<>
<ProfileLinks />
<HorizontalRule />
<HorizontalRule sideBarOpenContainer={sideBarOpenContainer} />
<div className={styles.mainContent}>
<div className={styles.profileImg}>
<ProfileImg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ import useBusiness from "./hooks/useBusiness"
import { Input } from "@cs/stories/Input"
import useProfilePhoto from "./hooks/useProfilePhoto"
import ProfileLinks from "./ProfileIdLinks"
import HorizontalRule from "./horizontalRule"
import HorizontalRule from "./HorizontalRule"

const BusinessDetailForm: React.FC = () => {
interface BusinessDetailFormProps {
sideBarOpenContainer: boolean
}

const BusinessDetailForm: React.FC<BusinessDetailFormProps> = ({
sideBarOpenContainer,
}) => {
const { bizData, handleBizInputs, handleBusinessSubmit, errors } =
useBusiness()
const { uploading, selectedImage, handleFileChange, error } =
Expand All @@ -17,7 +23,7 @@ const BusinessDetailForm: React.FC = () => {
return (
<>
<ProfileLinks />
<HorizontalRule />
<HorizontalRule sideBarOpenContainer={sideBarOpenContainer} />
<div className={styles.mainContent}>
<div className={styles.profileImg}>
<ProfileImg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ import useDocument from "./hooks/useDocument"
import useProfilePhoto from "./hooks/useProfilePhoto"
import { Input } from "@cs/stories/Input"
import FileInput from "./DocumentFIle"
import ProfileLinks from "./ProfileIdLinks"
import HorizontalRule from "./horizontalRule"
import ProfileLinks from "./ProfileLinks"
import HorizontalRule from "./HorizontalRule"

const DocumentUploadForm: React.FC = () => {
interface DocumentUploadFormProps {
sideBarOpenContainer: boolean
}

const DocumentUploadForm: React.FC<DocumentUploadFormProps> = ({
sideBarOpenContainer,
}) => {
const { docInfo, errors, handleDocumentUpload, handleDocumentSubmit } =
useDocument()

Expand All @@ -18,7 +24,7 @@ const DocumentUploadForm: React.FC = () => {
return (
<>
<ProfileLinks />
<HorizontalRule />
<HorizontalRule sideBarOpenContainer={sideBarOpenContainer} />
<div className={styles.mainContent}>
<div className={styles.profileImg}>
<ProfileImg
Expand All @@ -33,7 +39,7 @@ const DocumentUploadForm: React.FC = () => {
className={styles.personalDetails}
onSubmit={handleDocumentSubmit}
>
<p>Basic Information</p>
<p>Document Information</p>
<div className="flex flex-col justify-between gap-4 pt-8">
<Input
id="business_taxId"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@ import React from "react"
import Link from "next/link"
import styles from "@/styles/marketplaceprofile.module.css"

const ProfileLinks: React.FC<{ userId?: string }> = ({ userId = "" }) => {
const ProfileIdLinks: React.FC<{ userId?: string }> = ({ userId = "" }) => {
return (
<div className={styles.accountLinks}>
<Link href={`/dashboard/marketplace_dashboard/${userId}/myaccountform`}>
My Account
</Link>
<Link href={`/dashboard/marketplace_dashboard/${userId}/mybusinessform`}>
My Business
</Link>
<Link href={`/dashboard/marketplace_dashboard/${userId}/mydocumentform`}>
My Document
</Link>
<Link href={`/dashboard/profiles/${userId}/`}>My Account</Link>
<Link href={`/dashboard/profiles/${userId}/business`}>My Business</Link>
<Link href={`/dashboard/profiles/${userId}/document`}>My Document</Link>
</div>
)
}

export default ProfileLinks
export default ProfileIdLinks
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ import styles from "@/styles/marketplaceprofile.module.css"
const ProfileLinks: React.FC = () => {
return (
<div className={styles.accountLinks}>
<Link href="/dashboard/marketplace_dashboard/myaccountform">
My Account
</Link>
<Link href="/dashboard/marketplace_dashboard/mybusinessform">
My Business
</Link>
<Link href="/dashboard/marketplace_dashboard/mydocumentform">
My Documents
</Link>
<Link href="/dashboard/profiles/personalprofile">My Account</Link>
<Link href="/dashboard/profilesbusiness">My Business</Link>
<Link href="/dashboard/profiles/document">My Documents</Link>
</div>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import TopHelpBar from "../../../component/dashboard/MarketPlaceProfile/TopHelpB
import CategoryInputField from "../../../component/dashboard/MarketPlaceProfile/CategoryInputField"
import ProfileLinks from "../../../component/dashboard/MarketPlaceProfile/ProfileLinks"
import styles from "@/styles/marketplaceprofile.module.css"
import HorizontalRule from "@/component/dashboard/MarketPlaceProfile/horizontalRule"
import HorizontalRule from "@/component/dashboard/MarketPlaceProfile/HorizontalRule"

interface ProfileLayoutProps {
title: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "@/styles/global.css"
import MarketPlaceSideBar from "@/component/dashboard/MarketPlaceProfile/MarketplaceSidebar"
import ShopHeader from "@/component/dashboard/MarketPlaceShop/ShopHeader"
import styles from "@/styles/marketplaceshop.module.css"
import HorizontalRule from "@/component/dashboard/MarketPlaceProfile/horizontalRule"
import HorizontalRule from "@/component/dashboard/MarketPlaceProfile/HorizontalRule"
import TinyFooter from "@/component/dashboard/MarketPlaceShop/TinyFooter"

interface ShopLayoutProps {
Expand Down

0 comments on commit c1c5159

Please sign in to comment.