From 670f4bbf1a6e0cf9e534186853d2cdbe5a0b3818 Mon Sep 17 00:00:00 2001 From: Ebube Date: Mon, 26 Feb 2024 00:12:29 +0100 Subject: [PATCH 1/2] Added color to component and toggler to the env --- .env | 5 ++++- .env.development | 5 ++++- .env.production | 3 +++ src/components/Dashboards/AccountDashboard.jsx | 2 +- src/components/Home/FullAccountDash.jsx | 4 +++- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.env b/.env index 27d706e..4fd8113 100644 --- a/.env +++ b/.env @@ -105,4 +105,7 @@ REACT_APP_ANDROID_APP='https://play.google.com/store/apps/details?id=com.wrenchb REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls=1&mt=8' # Displays the new family dashboard with boxes -REACT_APP_SHOW_NEW_FAMILY_DASH=1 \ No newline at end of file +REACT_APP_SHOW_NEW_FAMILY_DASH=1 + +# Displays the account dashboard +REACT_APP_SHOW_ACCOUNT_DASH=1 \ No newline at end of file diff --git a/.env.development b/.env.development index 158c2c7..f5bc221 100644 --- a/.env.development +++ b/.env.development @@ -73,4 +73,7 @@ REACT_APP_ANDROID_APP='https://play.google.com/store/apps/details?id=com.wrenchb REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls=1&mt=8' # Displays the new family dashboard with boxes -REACT_APP_SHOW_NEW_FAMILY_DASH=1 \ No newline at end of file +REACT_APP_SHOW_NEW_FAMILY_DASH=1 + +# Displays the account dashboard +REACT_APP_SHOW_ACCOUNT_DASH=1 \ No newline at end of file diff --git a/.env.production b/.env.production index 4268f04..e2a00a2 100644 --- a/.env.production +++ b/.env.production @@ -80,3 +80,6 @@ REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls # Displays the new family dashboard with boxes REACT_APP_SHOW_NEW_FAMILY_DASH=0 + +# Displays the account dashboard +REACT_APP_SHOW_ACCOUNT_DASH=0 \ No newline at end of file diff --git a/src/components/Dashboards/AccountDashboard.jsx b/src/components/Dashboards/AccountDashboard.jsx index 77bd98a..182b23f 100644 --- a/src/components/Dashboards/AccountDashboard.jsx +++ b/src/components/Dashboards/AccountDashboard.jsx @@ -2,7 +2,7 @@ import React from 'react' const AccountDashboard = ({className}) => { return ( -
diff --git a/src/components/Home/FullAccountDash.jsx b/src/components/Home/FullAccountDash.jsx index 40bdbab..1329218 100644 --- a/src/components/Home/FullAccountDash.jsx +++ b/src/components/Home/FullAccountDash.jsx @@ -62,7 +62,9 @@ export default function FullAccountDash(props) { return ( <>
- + {process.env.REACT_APP_SHOW_ACCOUNT_DASH == "1" && ( + + )} {renderDashboard()} {props?.dashTypes !== "undefined" && From 8c400c7ce1cb2fe92dd225047369c6ca059d2aac Mon Sep 17 00:00:00 2001 From: Ebube Date: Mon, 26 Feb 2024 02:49:35 +0100 Subject: [PATCH 2/2] fixed market bug, fixed key issue and added texts fork the cards --- src/components/Cards/AvailableJobsCard.jsx | 40 +++++++--------------- src/components/Home/FullAccountDash.jsx | 2 ++ src/components/MarketPlace/MainSection.jsx | 2 +- 3 files changed, 15 insertions(+), 29 deletions(-) diff --git a/src/components/Cards/AvailableJobsCard.jsx b/src/components/Cards/AvailableJobsCard.jsx index d536a12..36bc61e 100644 --- a/src/components/Cards/AvailableJobsCard.jsx +++ b/src/components/Cards/AvailableJobsCard.jsx @@ -1,10 +1,11 @@ -import { useEffect, useState } from "react"; +import { useState } from "react"; import { PriceFormatter } from "../Helpers/PriceFormatter"; import MarketPopUp from "../MarketPlace/PopUp/MarketPopUp"; export default function AvailableJobsCard({ className, datas, + key, hidden = false, contentDisplay, image_server, @@ -19,10 +20,10 @@ export default function AvailableJobsCard({ datas?.currency ); - useEffect(() => { - const imagePath = require(`../../assets/images/${datas.thumbnil}`); // Replace with your directory path for local images - setImageUrl(imagePath); - }, []); + // useEffect(() => { + // const imagePath = require(`../../assets/images/${datas.thumbnil}`); // Replace with your directory path for local images + // setImageUrl(imagePath); + // }, []); const image = localStorage.getItem("session_token") ? `${image_server}${localStorage.getItem("session_token")}/job/${ @@ -37,6 +38,7 @@ export default function AvailableJobsCard({ className={`card-style-two w-full h-[426px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${ className || "" }`} + key={key} >
{ @@ -75,34 +77,16 @@ export default function AvailableJobsCard({
-
{datas.description}
+
+ {datas.description} +
-
- {/*
*/} - {/* {datas.isActive && (*/} - {/* */} - {/* Active*/} - {/**/} - {/* )}*/} - {/*
*/} - - {/*
*/} - {/* */} - {/* */} - {/* */} - {/*
*/} -
+
diff --git a/src/components/Home/FullAccountDash.jsx b/src/components/Home/FullAccountDash.jsx index 1329218..0a37391 100644 --- a/src/components/Home/FullAccountDash.jsx +++ b/src/components/Home/FullAccountDash.jsx @@ -59,6 +59,8 @@ export default function FullAccountDash(props) { } }; + console.log(process.env.REACT_APP_SHOW_ACCOUNT_DASH) + return ( <>
diff --git a/src/components/MarketPlace/MainSection.jsx b/src/components/MarketPlace/MainSection.jsx index dc493c0..f823c94 100644 --- a/src/components/MarketPlace/MainSection.jsx +++ b/src/components/MarketPlace/MainSection.jsx @@ -112,7 +112,7 @@ export default function MainSection({ )}