-
-
Briefs
-
-
- {Briefs?.briefsUnderReview?.length || 0}
+
+
+
+
+
Projects
+
+
router.push('/briefs/mybriefs')}
+ className='bg-imbue-purple px-7 py-2 text-white text-sm rounded-full cursor-pointer'
+ >
+ View all
-
-
-
-
-
Projects
-
-
- {Briefs?.acceptedBriefs?.length || 0}
-
+
+
+
+
Briefs
+
+
+ {Briefs?.briefsUnderReview?.length || 0}
+
+
-
-
-
-
-
Grants
-
-
- {Grants?.length || 0}
-
+
+
+
+
Projects
+
+
+ {Briefs?.acceptedBriefs?.length || 0}
+
+
+
+
+
+
+
Grants
+
+
+ {Grants?.length || 0}
+
+
-
-
+
+
+
Grants
-
+
setOpenedOption((prev) => !prev)}
@@ -230,14 +262,13 @@ export default function ClientDashboard() {
{options.map((option, index) => (
{
setFilterGrantoptions(option);
setOpenedOption(false);
@@ -251,52 +282,64 @@ export default function ClientDashboard() {
-
-
-
- {filteredGrants.length}
-
+
+
+ {filteredGrants.length}
+
+
{filterGrantoptions.name} Grants
+
+ View all
+
-
- View all
-
-
-
-
-
-
+
+
+
+
+
+
-
Payout Accounts
+
+
Payout Accounts
+
router.push('/relay')}
+ className='bg-imbue-purple px-4 lg:px-7 items-center py-1 lg:py-2 text-white text-sm rounded-full cursor-pointer'
+ >
+ Get Started
+
+
-
router.push('/relay')}
- className='bg-imbue-purple px-7 py-2 text-white text-sm rounded-full cursor-pointer'
- >
- Get Started
-
-
-
+
+
{/* ending of the box sections */}
+
{/* Freelancer recomendations */}
-
+
diff --git a/src/pages/dashboard/new.tsx b/src/pages/dashboard/components/FreelancerDashboard.tsx
similarity index 71%
rename from src/pages/dashboard/new.tsx
rename to src/pages/dashboard/components/FreelancerDashboard.tsx
index 97ea4347..a3bfca7a 100644
--- a/src/pages/dashboard/new.tsx
+++ b/src/pages/dashboard/components/FreelancerDashboard.tsx
@@ -1,12 +1,15 @@
/* eslint-disable unused-imports/no-unused-vars */
import { Badge } from '@mui/material';
import { useRouter } from 'next/router';
-import React, { useContext, useEffect, useMemo, useState } from 'react';
+import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
import { BiChevronDown, BiRightArrowAlt } from 'react-icons/bi';
import { MdOutlineAttachMoney } from 'react-icons/md';
import { useDispatch, useSelector } from 'react-redux';
+import Slider from 'react-slick';
import { Channel, DefaultGenerics } from 'stream-chat';
import 'stream-chat-react/dist/css/v2/index.css';
+import 'slick-carousel/slick/slick.css';
+import 'slick-carousel/slick/slick-theme.css';
import { fetchUser } from '@/utils';
@@ -26,7 +29,6 @@ import {
} from '@/redux/services/freelancerService';
import { setUnreadMessage } from '@/redux/slices/userSlice';
import { RootState } from '@/redux/store/store';
-
export type DashboardProps = {
user: User;
isAuthenticated: boolean;
@@ -244,6 +246,29 @@ const FreelancerDashboard = (): JSX.Element => {
if (user?.id) getProjects();
}, [selectedOption.status_id, user?.id]);
+ const sliderRef = useRef
(null);
+
+ const settings = {
+ dots: true,
+ infinite: false,
+ arrows: false,
+ slidesToShow: 3,
+ slidesToScroll: 3,
+ dotsClass: 'dashboard_slider',
+ responsive: [
+ {
+ breakpoint: 860,
+ settings: {
+ slidesToShow: 1,
+ slidesToScroll: 1,
+ dots: true,
+ variableWidth: true,
+ }
+ },
+ ]
+ }
+
+
if (loadingStreamChat || loadingUser) return ;
return client ? (
@@ -257,63 +282,66 @@ const FreelancerDashboard = (): JSX.Element => {
>
{/* starting of the box sections */}
-
-
-
-
Projects
-
-
router.push('/projects/myprojects')}
- >
- View all
-
-
-
-
-
-
Completed Projects
-
-
- {completedProjects?.length || 0}
+
+
+
+
+
+
Projects
+
router.push('/projects/myprojects')}
+ >
+ View all
-
-
-
-
-
Active Projects
-
-
- {activeProjects?.length || 0}
-
+
+
+
+
Completed Projects
+
+
+ {completedProjects?.length || 0}
+
+
-
-
-
-
-
Pending Projects
-
-
- {pendingProjects?.length || 0}
-
+
+
+
+
Active Projects
+
+
+ {activeProjects?.length || 0}
+
+
-
-
-
-
-
Grants
-
-
- {grants?.length || 0}
-
+
+
+
+
Pending Projects
+
+
+ {pendingProjects?.length || 0}
+
+
+
+
+
+
+
Grants
+
+
+ {grants?.length || 0}
+
+
-
-
+
+
+
Briefs
-
+
setOpenedOption((prev) => !prev)}
@@ -328,14 +356,13 @@ const FreelancerDashboard = (): JSX.Element => {
{options.map((option, index) => (
{
setSelectedOption(option);
setOpenedOption(false);
@@ -351,10 +378,10 @@ const FreelancerDashboard = (): JSX.Element => {
- {filteredApplications?.length}
+ {filteredApplications?.length || 0}
-
+
{selectedOption.name} brief
{
-
-
-
Total Earnings
-
router.push('/relay')}
- className='px-3 py-0.5 border cursor-pointer text-black border-text-aux-colour rounded-full'
- >
-
+
+
+
+
+
Total Earnings
+
router.push('/relay')}
+ className='px-3 ml-3 py-0.5 border cursor-pointer text-black border-text-aux-colour rounded-full'
+ >
+
+
-
-
-
-
-
{totalEarnings}
+
-
Payout Accounts
-
+
{/* ending of the box sections */}
-
+
+
-
+
{/* Starting of graph */}
diff --git a/src/components/WelcomeModalContent/WelcomeForNewUser.tsx b/src/pages/dashboard/components/WelcomeForNewUser.tsx
similarity index 100%
rename from src/components/WelcomeModalContent/WelcomeForNewUser.tsx
rename to src/pages/dashboard/components/WelcomeForNewUser.tsx
diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx
index 180e3aca..7c262f53 100644
--- a/src/pages/dashboard/index.tsx
+++ b/src/pages/dashboard/index.tsx
@@ -1,6 +1,3 @@
-/* eslint-disable @typescript-eslint/no-unused-vars */
-/* eslint-disable react-hooks/exhaustive-deps */
-
import dynamic from 'next/dynamic';
import { useRouter } from 'next/router';
import React, { useContext, useEffect, useState } from 'react';
@@ -16,15 +13,15 @@ const LoginPopup = dynamic(() => import('@/components/LoginPopup/LoginPopup'));
import { Modal } from '@mui/material';
import { AppContext, AppContextType } from '@/components/Layout';
-import WelcomForNewUser from '@/components/WelcomeModalContent/WelcomeForNewUser';
import { Project, User } from '@/model';
import { Brief } from '@/model';
import { setUnreadMessage } from '@/redux/slices/userSlice';
import { RootState } from '@/redux/store/store';
-import ClientDashboard from './ClientDashboard';
-import FreelancerDashboard from './new';
+import ClientDashboard from './components/ClientDashboard';
+import FreelancerDashboard from './components/FreelancerDashboard';
+import WelcomForNewUser from './components/WelcomeForNewUser';
export type DashboardProps = {
user: User;
@@ -68,7 +65,7 @@ const Dashboard = (): JSX.Element => {
}
};
setupStreamChat();
- }, [user]);
+ }, [loadingUser, router, user?.username]);
useEffect(() => {
if (client && user?.username && !loadingStreamChat) {
diff --git a/src/pages/freelancers/index.tsx b/src/pages/freelancers/index.tsx
index 6f52c9e6..a88ef8ee 100644
--- a/src/pages/freelancers/index.tsx
+++ b/src/pages/freelancers/index.tsx
@@ -1,5 +1,3 @@
-/* eslint-disable no-console */
-/* eslint-disable react-hooks/exhaustive-deps */
import VerifiedRoundedIcon from '@mui/icons-material/VerifiedRounded';
import Grid from '@mui/material/Grid';
const TextField = dynamic(() => import("@mui/material/TextField"), {
@@ -15,12 +13,12 @@ const ClearIcon = dynamic(() => import("@mui/icons-material/Clear"), {
import dynamic from 'next/dynamic';
import Image from 'next/image';
import { useRouter } from 'next/router';
-import React, { useEffect, useState } from 'react';
+import React, { useContext, useEffect, useState } from 'react';
import { strToIntRange } from '@/utils/helper';
-import ErrorScreen from '@/components/ErrorScreen';
import FilterModal from '@/components/Filter/FilterModal';
+import { AppContext, AppContextType } from '@/components/Layout';
import {
chevLeftIcon,
@@ -44,8 +42,6 @@ import {
} from '../../redux/services/freelancerService';
import { FreelancerFilterOption } from '../../types/freelancerTypes';
-
-
const Freelancers = (): JSX.Element => {
const [freelancers, setFreelancers] = useState<
Freelancer[] | undefined | any
@@ -62,9 +58,10 @@ const Freelancers = (): JSX.Element => {
const [pageInput, setPageInput] = useState
(1);
const [selectedFilterIds, setSlectedFilterIds] = useState>([]);
- const [error, setError] = useState()
const router = useRouter();
+ const { setError } = useContext(AppContext) as AppContextType
+
const {
skillsRangeProps,
servicesRangeProps,
@@ -457,9 +454,10 @@ const Freelancers = (): JSX.Element => {
}
if (loading) return ;
+
return (
-
+
toggleFilter()}
{
...{ selectedFilterIds, handleSetId, cancelFilters, customDropdownConfigs, onSearch }
@@ -468,7 +466,7 @@ const Freelancers = (): JSX.Element => {
-
+
@@ -499,7 +497,7 @@ const Freelancers = (): JSX.Element => {
}
/> */}
-
+
{
)}
-
+
-
-
-
-
-
-
);
};
diff --git a/src/pages/freelancers/new.tsx b/src/pages/freelancers/new.tsx
index 7c198112..5934db1d 100644
--- a/src/pages/freelancers/new.tsx
+++ b/src/pages/freelancers/new.tsx
@@ -122,7 +122,7 @@ const Freelancer = (): JSX.Element => {
const FreelanceExperience = (
-
+
{stepData[step].content
.split('\n')
.map((line: string, index: number) => (
@@ -150,7 +150,7 @@ const Freelancer = (): JSX.Element => {
const FreelancerHourPerRate = (
-
+
{stepData[step].content.split('\n').map((line, index) => (
{line}
))}
@@ -178,7 +178,7 @@ const Freelancer = (): JSX.Element => {
const FreelancingGoal = (
-
+
{stepData[step].content.split('\n').map((line, index) => (
{line}
))}
@@ -203,7 +203,7 @@ const Freelancer = (): JSX.Element => {
// const ImportResume = (
// // TODO:
//
- //
+ //
// {stepData[step].content.split('\n').map((line, index) => (
//
{line}
// ))}
@@ -226,7 +226,7 @@ const Freelancer = (): JSX.Element => {
const TitlePanel = (
-
+
{stepData[step].content.split('\n').map((line, index) => (
{line}
))}
@@ -247,7 +247,7 @@ const Freelancer = (): JSX.Element => {
// const ExperiencePanel = (
//
- //
+ //
// {stepData[step].content.split('\n').map((line, index) => (
//
{line}
// ))}
@@ -257,7 +257,7 @@ const Freelancer = (): JSX.Element => {
const EducationPanel = (
-
+
{stepData[step].content.split('\n').map((line, index) => (
{line}
))}
@@ -282,7 +282,7 @@ const Freelancer = (): JSX.Element => {
const LanguagePanel = (
-
+
{stepData[step].content.split('\n').map((line, index) => (
{line}
))}
@@ -313,7 +313,7 @@ const Freelancer = (): JSX.Element => {
const SkillsPanel = (
-
+
{stepData[step].content.split('\n').map((line, index) => (
{line}
))}
@@ -349,7 +349,7 @@ const Freelancer = (): JSX.Element => {
const BioPanel = (
-
+
{stepData[step].content.split('\n').map((line, index) => (
{line}
))}
@@ -375,7 +375,7 @@ const Freelancer = (): JSX.Element => {
const ServicesPanel = (
-
+
{stepData[step].content.split('\n').map((line, index) => (
{line}
))}
@@ -532,9 +532,9 @@ const Freelancer = (): JSX.Element => {
-
+
{stepData[step].heading.replace('{name}', displayName)}
-
+
{panels[step] ?? <>>}
@@ -549,7 +549,7 @@ const Freelancer = (): JSX.Element => {
{step === 0 ? (
@@ -613,7 +612,12 @@ const GrantApplication = (): JSX.Element => {
Payment Address:
{accounts.length == 0 ? (
-
+
) : (
)}
-
-
+
Milestones
@@ -721,8 +724,9 @@ const GrantApplication = (): JSX.Element => {
''}
- {`${milestones[index].description?.length || 0
- }/5000`}
+ {`${
+ milestones[index].description?.length || 0
+ }/5000`}
@@ -788,51 +792,50 @@ const GrantApplication = (): JSX.Element => {
Add milestone
-
-
+
+
-
- Requested budget
-
+
Requested budget
- {`${Number(totalCostWithoutFee.toFixed(2)).toLocaleString()} $${Currency[currencyId]
- }`}
+ {`${Number(totalCostWithoutFee.toFixed(2)).toLocaleString()} $${
+ Currency[currencyId]
+ }`}
-
-
-
+
+
-
- {`${Number(imbueFee.toFixed(2)).toLocaleString()} $${Currency[currencyId]
- }`}
-
+
+ {`${Number(imbueFee.toFixed(2)).toLocaleString()} $${
+ Currency[currencyId]
+ }`}
+
-
+
-
- {Number(amountDue.toFixed(2)).toLocaleString()} ${
- Currency[currencyId]
- }
+
Amount Received
+
+ {Number(amountDue.toFixed(2)).toLocaleString()} $
+ {Currency[currencyId]}
+
@@ -846,8 +849,9 @@ const GrantApplication = (): JSX.Element => {
>
Grant Wallet Address Copied to clipboard
diff --git a/src/pages/grants/ongoinggrants.tsx b/src/pages/grants/ongoinggrants.tsx
index 5659d566..185f435b 100644
--- a/src/pages/grants/ongoinggrants.tsx
+++ b/src/pages/grants/ongoinggrants.tsx
@@ -46,7 +46,7 @@ export default function Ongoinggrants() {
color='secondary'
/>
-
+
{applicationStatusId[Number(status_id)]} Grants
diff --git a/src/pages/projects/[id].tsx b/src/pages/projects/[id].tsx
index ad780632..e2f4bcb8 100644
--- a/src/pages/projects/[id].tsx
+++ b/src/pages/projects/[id].tsx
@@ -29,8 +29,7 @@ import { getBalance } from '@/utils/helper';
import ChatPopup from '@/components/ChatPopup';
import ErrorScreen from '@/components/ErrorScreen';
import RefundScreen from '@/components/Grant/Refund';
-import { LoginPopupContext } from '@/components/Layout';
-import { LoginPopupContextType } from '@/components/Layout';
+import { AppContext, AppContextType } from '@/components/Layout';
import BackDropLoader from '@/components/LoadingScreen/BackDropLoader';
import { MilestoneProgressBar } from '@/components/MilestoneProgressBar/MilestoneProgressBar';
import ProjectApprovers from '@/components/Project/ProjectApprovers';
@@ -373,8 +372,9 @@ function Project() {
useState
(null);
const { setShowLoginPopup } = useContext(
- LoginPopupContext
- ) as LoginPopupContextType;
+ AppContext
+ ) as AppContextType;
+
const [showMessageBox, setShowMessageBox] = useState(false);
const handleMessageBoxClick = () => {
@@ -390,29 +390,29 @@ function Project() {
const canReview = oneMielstoneApproved && !userReviewed && (isApprover || (projectType === 'brief' && isProjectOwner))
return (
-
+
router.back()}
- className='border border-content group hover:bg-content rounded-full flex items-center justify-center cursor-pointer absolute left-5 top-5'
+ className='border border-content group hover:bg-content rounded-full flex items-center justify-center cursor-pointer absolute lg:left-5 lg:top-5 left-6 top-7'
>
-
-
+
+
{projectType} information
{/* starting of project section */}
-
-
Project Description
-
+
+
Project Description
+
{project?.project_in_voting_of_no_confidence && (
-