Merge branch 'resources-page' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -0,0 +1,72 @@
|
|||||||
|
import React, { useState } from "react";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import { toast } from "react-toastify";
|
||||||
|
import localImgLoad from "../../lib/localImgLoad";
|
||||||
|
import Icons from "../Helpers/Icons";
|
||||||
|
|
||||||
|
export default function FamilyMarketCard({
|
||||||
|
className,
|
||||||
|
datas,
|
||||||
|
hidden = false,
|
||||||
|
}) {
|
||||||
|
// debugger;
|
||||||
|
const [addFavorite, setValue] = useState(datas.whishlisted);
|
||||||
|
const [options, setOption] = useState(false);
|
||||||
|
const favoriteHandler = () => {
|
||||||
|
if (!addFavorite) {
|
||||||
|
setValue(true);
|
||||||
|
toast.success("Added to Favorite List");
|
||||||
|
} else {
|
||||||
|
setValue(false);
|
||||||
|
toast.warn("Remove to Favorite List");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className={`card-style-two w-full h-[336px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
|
||||||
|
className || ""
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
<div className="flex flex-col justify-between w-full h-full">
|
||||||
|
<div className="thumbnail-area w-full">
|
||||||
|
<div
|
||||||
|
className="w-full h-[236px] p-6 rounded-xl overflow-hidden"
|
||||||
|
style={{
|
||||||
|
background: `url(${`https://blog.float.sg/wp-content/uploads/${datas.meta_value}`}) 0% 0% / cover no-repeat`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="product-two-options flex justify-between mb-5 relative">
|
||||||
|
<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>
|
||||||
|
{hidden && <div className="flex justify-center"></div>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="details-area">
|
||||||
|
{/* title */}
|
||||||
|
<Link to="/shop-details" className="mb-2.5">
|
||||||
|
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
|
||||||
|
{datas.post_title}
|
||||||
|
</h1>
|
||||||
|
</Link>
|
||||||
|
<div className="flex justify-between">
|
||||||
|
<div className="flex items-center space-x-2"></div>
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="px-4 py-2.5 text-white text-sm bg-pink rounded-full tracking-wide"
|
||||||
|
>
|
||||||
|
View
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,10 +1,6 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
import localImgLoad from "../../lib/localImgLoad";
|
|
||||||
import Icons from "../Helpers/Icons";
|
|
||||||
|
|
||||||
import Image from '../../assets/images/Linkedin.png'
|
|
||||||
|
|
||||||
export default function ProductCardStyleTwo({
|
export default function ProductCardStyleTwo({
|
||||||
className,
|
className,
|
||||||
@@ -54,9 +50,9 @@ export default function ProductCardStyleTwo({
|
|||||||
</div>
|
</div>
|
||||||
<div className="details-area">
|
<div className="details-area">
|
||||||
{/* title */}
|
{/* title */}
|
||||||
<a href={datas.guid} target="_blank" className="mb-2.5">
|
<a href={datas.guid} target="_blank" className="mb-2.5" rel="noreferrer">
|
||||||
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
|
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
|
||||||
{datas.post_title}
|
{datas.post_title || "dummy title..."}
|
||||||
</h1>
|
</h1>
|
||||||
</a>
|
</a>
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
@@ -66,6 +62,7 @@ export default function ProductCardStyleTwo({
|
|||||||
href={datas.guid}
|
href={datas.guid}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
className="px-4 py-2.5 text-white text-sm bg-pink rounded-full tracking-wide"
|
className="px-4 py-2.5 text-white text-sm bg-pink rounded-full tracking-wide"
|
||||||
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
View
|
View
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -3,6 +3,11 @@ import InputCom from "../Helpers/Inputs/InputCom";
|
|||||||
import Layout from "../Partials/Layout";
|
import Layout from "../Partials/Layout";
|
||||||
import SiteService from "../../services/SiteService";
|
import SiteService from "../../services/SiteService";
|
||||||
import ModalCom from "../Helpers/ModalCom";
|
import ModalCom from "../Helpers/ModalCom";
|
||||||
|
import DataIteration from "../Helpers/DataIteration";
|
||||||
|
import SearchCom from "../Helpers/SearchCom";
|
||||||
|
import collections from "../../data/collectionplan_data.json";
|
||||||
|
import FamilyMarketCard from "../Cards/FamilyMarketCard";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
export default function FamilyMarket() {
|
export default function FamilyMarket() {
|
||||||
const [selectTab, setValue] = useState("today");
|
const [selectTab, setValue] = useState("today");
|
||||||
@@ -24,7 +29,6 @@ export default function FamilyMarket() {
|
|||||||
setValue(value);
|
setValue(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
{/*<CommonHead />*/}
|
{/*<CommonHead />*/}
|
||||||
@@ -37,15 +41,8 @@ export default function FamilyMarket() {
|
|||||||
<span
|
<span
|
||||||
className={`${selectTab === "today" ? "block" : "hidden"}`}
|
className={`${selectTab === "today" ? "block" : "hidden"}`}
|
||||||
>
|
>
|
||||||
Family Market
|
Suggest Task to the Parents
|
||||||
</span>
|
</span>
|
||||||
{/* <button
|
|
||||||
onClick={popUpHandler}
|
|
||||||
type="button"
|
|
||||||
className="text-white btn-gradient text-lg tracking-wide px-5 py-2 rounded-full"
|
|
||||||
>
|
|
||||||
Add
|
|
||||||
</button> */}
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="slider-btns flex space-x-4">
|
<div className="slider-btns flex space-x-4">
|
||||||
@@ -55,6 +52,35 @@ export default function FamilyMarket() {
|
|||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{/* Body */}
|
||||||
|
<div className="filter-section w-full items-center sm:flex justify-between mb-6">
|
||||||
|
{/* filter-search */}
|
||||||
|
<div className="sm:w-1/2 w-full sm:pr-20 pr-0 mb-5 sm:mb-0">
|
||||||
|
<SearchCom />
|
||||||
|
</div>
|
||||||
|
{/* filer-dropdown */}
|
||||||
|
<div className="flex-1 flex sm:justify-end">
|
||||||
|
<Link
|
||||||
|
to="/upload-product"
|
||||||
|
className="btn-gradient lg:flex hidden w-[153px] h-[46px] rounded-full text-white justify-center items-center"
|
||||||
|
>
|
||||||
|
Any Other Task
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="content-section w-full-width">
|
||||||
|
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
|
||||||
|
<DataIteration
|
||||||
|
datas={collections?.data}
|
||||||
|
startLength={process.env.REACT_APP_ZERO_STATE}
|
||||||
|
endLength={collections?.data.length}
|
||||||
|
>
|
||||||
|
{({ datas }) => (
|
||||||
|
<FamilyMarketCard key={datas.id} datas={datas} />
|
||||||
|
)}
|
||||||
|
</DataIteration>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{popUp && (
|
{popUp && (
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ export default function ParentWaiting({ className }) {
|
|||||||
Waiting for Parent to Get Started...
|
Waiting for Parent to Get Started...
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div className="overview-section-wrapper lg:flex lg:h-[494px] lg:pace-x-2 flex-1">
|
<div className="overview-section-wrapper lg:flex lg:h-[494px] lg:pace-x-2 flex-1 lg:gap-8">
|
||||||
<div className="lg:w-[540px] w-full h-full bg-white dark:bg-dark-white flex-[50%] rounded-2xl overflow-hidden mb-10">
|
<div className=" w-full h-full bg-white dark:bg-dark-white flex-[50%] rounded-2xl overflow-hidden mb-10">
|
||||||
<img
|
<img
|
||||||
src={activeAidsBanner}
|
src={activeAidsBanner}
|
||||||
alt="banner"
|
alt="banner"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import SearchCom from "../../Helpers/SearchCom";
|
|||||||
import ResourceBlogCard from "../../Cards/ResourceBlogCard";
|
import ResourceBlogCard from "../../Cards/ResourceBlogCard";
|
||||||
|
|
||||||
export default function BlogTab({ className, blogdata }) {
|
export default function BlogTab({ className, blogdata }) {
|
||||||
|
console.log("Blog data here>> ", blogdata);
|
||||||
// debugger;
|
// debugger;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -39,6 +40,7 @@ export default function BlogTab({ className, blogdata }) {
|
|||||||
{/* </div>*/}
|
{/* </div>*/}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="content-section w-full-width">
|
<div className="content-section w-full-width">
|
||||||
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
|
<div className="grid lg:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-[30px]">
|
||||||
<DataIteration
|
<DataIteration
|
||||||
@@ -47,7 +49,11 @@ export default function BlogTab({ className, blogdata }) {
|
|||||||
endLength={blogdata?.blogdata.length}
|
endLength={blogdata?.blogdata.length}
|
||||||
>
|
>
|
||||||
{({ datas }) => (
|
{({ datas }) => (
|
||||||
<ResourceBlogCard key={datas.id} datas={datas} bg={blogdata.image_url} />
|
<ResourceBlogCard
|
||||||
|
key={datas.id}
|
||||||
|
datas={datas}
|
||||||
|
bg={blogdata.image_url}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</DataIteration>
|
</DataIteration>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user