diff --git a/public/Onboard/bank-note-01.svg b/public/Onboard/bank-note-01.svg new file mode 100644 index 00000000..d12e9627 --- /dev/null +++ b/public/Onboard/bank-note-01.svg @@ -0,0 +1,3 @@ + diff --git a/public/Onboard/building-02.svg b/public/Onboard/building-02.svg new file mode 100644 index 00000000..fbfc691b --- /dev/null +++ b/public/Onboard/building-02.svg @@ -0,0 +1,3 @@ + diff --git a/public/Onboard/globe-05.svg b/public/Onboard/globe-05.svg new file mode 100644 index 00000000..c5b398a8 --- /dev/null +++ b/public/Onboard/globe-05.svg @@ -0,0 +1,3 @@ + diff --git a/public/Onboard/hearts.svg b/public/Onboard/hearts.svg new file mode 100644 index 00000000..0ab63b91 --- /dev/null +++ b/public/Onboard/hearts.svg @@ -0,0 +1,3 @@ + diff --git a/public/Onboard/safe.svg b/public/Onboard/safe.svg new file mode 100644 index 00000000..7b047224 --- /dev/null +++ b/public/Onboard/safe.svg @@ -0,0 +1,3 @@ + diff --git a/public/Onboard/zap-square.svg b/public/Onboard/zap-square.svg new file mode 100644 index 00000000..1fa8cf10 --- /dev/null +++ b/public/Onboard/zap-square.svg @@ -0,0 +1,4 @@ + diff --git a/src/components/AreaGraph/index.tsx b/src/components/AreaGraph/index.tsx index 76461928..33def241 100644 --- a/src/components/AreaGraph/index.tsx +++ b/src/components/AreaGraph/index.tsx @@ -1,10 +1,16 @@ import dynamic from 'next/dynamic'; +import { userAnalyticsType } from '@/pages/dashboard/new'; + const Chart = dynamic(() => import('react-apexcharts'), { ssr: false, }); -export default function AreaGrah() { +export default function AreaGrah({ + userInfo, +}: { + userInfo: userAnalyticsType[]; +}) { const options = { fill: { colors: ['#3B27C1'], @@ -21,14 +27,14 @@ export default function AreaGrah() { show: false, }, xaxis: { - categories: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'], + categories: userInfo?.map((item) => item.label.substring(0, 3)), }, }; const series = [ { name: 'profile views', - data: [0, 0, 3, 5, 2, 6, 0], + data: userInfo?.map((item) => item.value), }, ]; diff --git a/src/components/BriefComponent/index.tsx b/src/components/BriefComponent/index.tsx index b87b8582..fdfdfdc4 100644 --- a/src/components/BriefComponent/index.tsx +++ b/src/components/BriefComponent/index.tsx @@ -1,9 +1,8 @@ -import StarIcon from '@mui/icons-material/Star'; -import { Rating } from '@mui/material'; import TimeAgo from 'javascript-time-ago'; import en from 'javascript-time-ago/locale/en.json'; import Image from 'next/image'; import { useRouter } from 'next/router'; +import { useEffect, useState } from 'react'; import { AiOutlineCalendar, AiOutlineClockCircle, @@ -15,13 +14,28 @@ import { TbUsers } from 'react-icons/tb'; import { TfiEmail } from 'react-icons/tfi'; import { VscVerified } from 'react-icons/vsc'; -import { Brief } from '@/model'; - TimeAgo.addLocale(en); const timeAgo = new TimeAgo('en-US'); -export default function BriefComponent({ brief }: { brief: Brief }) { +export default function BriefComponent({ brief }: { brief: any }) { const router = useRouter(); + const [user_Activites, setUserActivites] = useState({ + totalSpent: 0, + totalHire: 0, + activeHire: 0, + }); + useEffect(() => { + let totalSpent = 0; + let totalHire = 0; + let activeHire = 0; + for (const project of brief.user_hire_history) { + if (project.project_status === 6) totalSpent += Number(project.cost); + if (project.project_status === 4 || project.status === 5) activeHire++; + if (project.project_status !== 0) totalHire++; + } + setUserActivites({ totalSpent, activeHire, totalHire }); + }, [brief]); + return (
4.68 of 40 reviews
-Member since: Aug 17,2023
+ {/*4.68 of 40 reviews
*/} +Member since: {timeAgo.format(new Date(brief.joined))}
- $50-$75 hr + ${freelancer.hour_per_rate.toFixed(2)} + hr
- Job Success rate 99.2% + Job Success rate{' '} + {freelancerSuccsRate > 0 && ( + + {Math.floor(freelancerSuccsRate)}% + + )} + {freelancerSuccsRate === 0 && ( + NA + )}
-{props?.user?.name}
-{props?.text}
+{targetUser?.name}
+{props?.lastMessage()?.text}
- {props?.created_at && timeAgo.format(new Date(props?.created_at))} + {props?.lastMessage()?.created_at && + timeAgo.format(new Date(props?.lastMessage()?.created_at))}
+ Welcome to imbue, {user.display_name.split(' ')[0]} 👋 +
+Glad to have you join
+
+
+
+
+
+
+
+ You can always switch/create a hirer or freelancer profile after you + sign up +
+Make web3 work for you
-Make web3 work for you
+Sign up with wallet
++ Sign up with wallet +
+
{error.password}
Password strength requirement
-8+
-Characters
+Password strength requirement
++ 8+ +
+Characters
AA
-Uppercase
++ AA +
+Uppercase
aa
-Lowercase
++ aa +
+Lowercase
123
-Numbers
++ 123 +
+Numbers
$#^
-Symbol
++ $#^ +
+Symbol
By signing up, you agree with Imbue’s Terms & Conditions and Privacy Policy.
++ By signing up, you agree with Imbue’s{' '} + + Terms & Conditions + {' '} + and Privacy Policy. +
Analytics
-{totalViews} views
- 124 -
-Messaging
diff --git a/src/pages/freelancers/[slug].tsx b/src/pages/freelancers/[slug].tsx index 42886691..c6b314c4 100644 --- a/src/pages/freelancers/[slug].tsx +++ b/src/pages/freelancers/[slug].tsx @@ -10,6 +10,7 @@ import { InputAdornment, InputLabel, MenuItem, + OutlinedInput, Select, TextField, Tooltip, @@ -64,6 +65,7 @@ import SuccessScreen from '@/components/SuccessScreen'; import { Currency, Freelancer, Project, User } from '@/model'; import { fetchUserRedux } from '@/redux/reducers/userReducers'; +import { setUserAnalytics } from '@/redux/services/briefService'; import { getFreelancerApplications, getFreelancerProfile, @@ -101,6 +103,9 @@ const Profile = ({ initFreelancer }: ProfileProps): JSX.Element => { const memberSince = moment(freelancer?.created).format('MMMM YYYY'); const [prevUserName, setprevUserName] = useState(freelancer.username); const [titleError, settitleError] = useState+ ${Number(freelancer?.hour_per_rate).toFixed(2)} + /hr +