.
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { toast } from "react-toastify";
|
||||
import getTimeAgo from "../../lib/getTimeAgo";
|
||||
import Icons from "../Helpers/Icons";
|
||||
import { getTimeAgo } from "../../lib";
|
||||
import SuggestTask from "../FamilyPopup/SuggestTask";
|
||||
|
||||
export default function FamilyMarketCard({ className, datas, hidden = false }) {
|
||||
@@ -13,8 +10,7 @@ export default function FamilyMarketCard({ className, datas, hidden = false }) {
|
||||
setPopUp((prev) => !prev);
|
||||
};
|
||||
// Image
|
||||
let selectedImage =
|
||||
datas?.image || require("../../assets/images/banner-job-due.jpg");
|
||||
let selectedImage = require(`../../assets/images/family/${datas.banner || "default.jpg"}`);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -28,6 +24,7 @@ export default function FamilyMarketCard({ className, datas, hidden = false }) {
|
||||
<div className="thumbnail-area w-full">
|
||||
<div
|
||||
className="w-full h-[236px] p-6 rounded-xl overflow-hidden"
|
||||
onClick={popUpHandler}
|
||||
style={{
|
||||
background: `url(${selectedImage}) 0% 0% / cover no-repeat`,
|
||||
}}
|
||||
@@ -68,7 +65,7 @@ export default function FamilyMarketCard({ className, datas, hidden = false }) {
|
||||
</div>
|
||||
</div>
|
||||
{popUp && (
|
||||
<SuggestTask onClose={popUpHandler} situation={popUp} details={datas} />
|
||||
<SuggestTask onClose={popUpHandler} situation={popUp} details={{...datas, selectedImage}} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user