Merge branch 'home-banners-dashboard' of WrenchBoard/Users-Wrench into master

This commit is contained in:
2024-02-26 10:39:34 +00:00
committed by Gogs
7 changed files with 30 additions and 33 deletions
+4 -1
View File
@@ -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' REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls=1&mt=8'
# Displays the new family dashboard with boxes # Displays the new family dashboard with boxes
REACT_APP_SHOW_NEW_FAMILY_DASH=1 REACT_APP_SHOW_NEW_FAMILY_DASH=1
# Displays the account dashboard
REACT_APP_SHOW_ACCOUNT_DASH=1
+4 -1
View File
@@ -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' REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls=1&mt=8'
# Displays the new family dashboard with boxes # Displays the new family dashboard with boxes
REACT_APP_SHOW_NEW_FAMILY_DASH=1 REACT_APP_SHOW_NEW_FAMILY_DASH=1
# Displays the account dashboard
REACT_APP_SHOW_ACCOUNT_DASH=1
+3
View File
@@ -80,3 +80,6 @@ REACT_APP_APPLE_APP='https://itunes.apple.com/us/app/wrenchboard/id1435718367?ls
# Displays the new family dashboard with boxes # Displays the new family dashboard with boxes
REACT_APP_SHOW_NEW_FAMILY_DASH=0 REACT_APP_SHOW_NEW_FAMILY_DASH=0
# Displays the account dashboard
REACT_APP_SHOW_ACCOUNT_DASH=0
+12 -28
View File
@@ -1,10 +1,11 @@
import { useEffect, useState } from "react"; import { useState } from "react";
import { PriceFormatter } from "../Helpers/PriceFormatter"; import { PriceFormatter } from "../Helpers/PriceFormatter";
import MarketPopUp from "../MarketPlace/PopUp/MarketPopUp"; import MarketPopUp from "../MarketPlace/PopUp/MarketPopUp";
export default function AvailableJobsCard({ export default function AvailableJobsCard({
className, className,
datas, datas,
key,
hidden = false, hidden = false,
contentDisplay, contentDisplay,
image_server, image_server,
@@ -19,10 +20,10 @@ export default function AvailableJobsCard({
datas?.currency datas?.currency
); );
useEffect(() => { // useEffect(() => {
const imagePath = require(`../../assets/images/${datas.thumbnil}`); // Replace with your directory path for local images // const imagePath = require(`../../assets/images/${datas.thumbnil}`); // Replace with your directory path for local images
setImageUrl(imagePath); // setImageUrl(imagePath);
}, []); // }, []);
const image = localStorage.getItem("session_token") const image = localStorage.getItem("session_token")
? `${image_server}${localStorage.getItem("session_token")}/job/${ ? `${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={`card-style-two w-full h-[426px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
className || "" className || ""
}`} }`}
key={key}
> >
<div <div
onClick={() => { onClick={() => {
@@ -75,34 +77,16 @@ export default function AvailableJobsCard({
<div <div
className="w-full h-[236px] p-6 rounded-xl overflow-hidden bg-center bg-cover bg-no-repeat" className="w-full h-[236px] p-6 rounded-xl overflow-hidden bg-center bg-cover bg-no-repeat"
style={{ style={{
backgroundImage: `url('${imageUrl}')`, backgroundImage: `url('${image}')`,
}} }}
> >
<div className="flex justify-center">{datas.description}</div> <div className="flex justify-center bg-slate-100 p-2 rounded-md">
{datas.description}
</div>
</div> </div>
</div> </div>
<div className="details-area"> <div className="details-area">
<div className="product-two-options flex justify-between mb-5 relative"> <div className="product-two-options flex justify-between mb-5 relative"></div>
{/* <div className="status">*/}
{/* {datas.isActive && (*/}
{/* <span className="text-xs px-3 py-1.5 tracking-wide rounded-full bg-gold text-white">*/}
{/* Active*/}
{/*</span>*/}
{/* )}*/}
{/* </div>*/}
{/*<div className=" review flex space-x-2">*/}
{/* <button*/}
{/* onClick={favoriteHandler}*/}
{/* type="button"*/}
{/* className={`w-7 h-7 bg-white rounded-full flex justify-center items-center ${*/}
{/* addFavorite ? "text-red-500" : "text-thin-light-gray"*/}
{/* }`}*/}
{/* >*/}
{/* <Icons name="star" />*/}
{/* </button>*/}
{/*</div>*/}
</div>
<div className="flex justify-between"> <div className="flex justify-between">
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
@@ -2,7 +2,7 @@ import React from 'react'
const AccountDashboard = ({className}) => { const AccountDashboard = ({className}) => {
return ( return (
<div className={`w-full min-h-[400px] md:grid grid-cols-2 lg:p-8 p-4 justify-between items-center gap-2 rounded-2xl overflow-hidden ${ <div className={`w-full min-h-[400px] md:grid grid-cols-2 lg:p-8 p-4 justify-between items-center gap-2 rounded-2xl overflow-hidden bg-[#ffed00] ${
className || "" className || ""
}`}> }`}>
<div className="w-full h-full flex items-center justify-center text-5xl text-center"> <div className="w-full h-full flex items-center justify-center text-5xl text-center">
+5 -1
View File
@@ -59,10 +59,14 @@ export default function FullAccountDash(props) {
} }
}; };
console.log(process.env.REACT_APP_SHOW_ACCOUNT_DASH)
return ( return (
<> <>
<div className="home-page-wrapper"> <div className="home-page-wrapper">
<AccountDashboard className="mb-4" /> {process.env.REACT_APP_SHOW_ACCOUNT_DASH == "1" && (
<AccountDashboard className="mb-4" />
)}
{renderDashboard()} {renderDashboard()}
{props?.dashTypes !== "undefined" && {props?.dashTypes !== "undefined" &&
+1 -1
View File
@@ -112,7 +112,7 @@ export default function MainSection({
<AvailableJobsCard <AvailableJobsCard
contentDisplay={contentDisplay} contentDisplay={contentDisplay}
image_server={image_server} image_server={image_server}
key={datas.id} key={datas.job_uid}
datas={datas} datas={datas}
/> />
)} )}