recent job fix

This commit is contained in:
dev-chiefworks
2022-03-09 20:28:02 -05:00
parent 3f323ee8c9
commit 71b460e75c
4 changed files with 112 additions and 207 deletions
+93 -70
View File
@@ -1,88 +1,111 @@
import React from 'react';
import React, { Component } from 'react';
import blogOne from '../../assets/images/blog-1.jpg';
import blogTwo from '../../assets/images/blog-2.jpg';
import blogThree from '../../assets/images/blog-3.jpg';
import JobsData from '../../Services/JobsData';
function RecentJobsOne() {
const jobsDataResults = JobsData();
var dashUrl = "https://dashboard.wrenchboard.com/";
class RecentJobsOne extends Component {
return (
<>
<section className="appie-blog-area pt-90 pb-95">
<div className="container">
<div className="row">
<div className="col-lg-12">
<div className="appie-section-title text-center">
<h3 className="appie-title">WrenchBoard Market</h3>
</div>
</div>
</div>
<div className="row">
constructor() {
// debugger;
super();
this.state = { jobsDataResults: [] };
}
{
jobsDataResults.map(i=>{
async componentDidMount(){
debugger;
const response = await JobsData();
this.setState({jobsDataResults:response});
}
return ( <div className="col-lg-3 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="200ms"
>
<div className="content">
// if (jobsDataResults ()== null){
// return null;
// }
render() {
<h3 className="title">
<a href={dashUrl}>
{i.title}
</a>
</h3>
<div className="blog-meta">
<ul>
<li>
<a href={dashUrl}>Expires : {i.expire}</a>
</li>
</ul>
</div>
<a href={dashUrl}>
Learn More <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>)
if ( this.state.jobsDataResults== undefined ){
return null;
}
var dashUrl = "https://dashboard.wrenchboard.com/";
})
}
<div className="col-lg-3 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="600ms"
>
<div className="content">
<h3 className="title">
<a href={dashUrl}>
Find more oprotunities at our marketplace.
</a>
</h3>
<a href="https://www.wrenchboard.com/login">
Login now <i className="fal fa-arrow-right" />
</a>
return (
<>
<section className="appie-blog-area pt-90 pb-95">
<div className="container">
<div className="row">
<div className="col-lg-12">
<div className="appie-section-title text-center">
<h3 className="appie-title">WrenchBoard Market</h3>
</div>
</div>
</div>
<div className="row">
{
this.state.jobsDataResults.map(i => {
var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
var postDt = new Date(i.expire).toLocaleDateString("en-US", options);
return (<div className="col-lg-3 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="200ms"
>
<div className="content">
<h3 className="title">
<a href={dashUrl}>
{i.title}
</a>
</h3>
<div className="blog-meta">
<ul>
<li className="expire">
<a href={dashUrl}>Expires : {postDt}</a>
</li>
</ul>
</div>
<a href={dashUrl}>
Learn More <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>)
})
}
<div className="col-lg-3 col-md-6">
<div
className="appie-blog-item mt-30 wow animated fadeInUp"
data-wow-duration="3000ms"
data-wow-delay="600ms"
>
<div className="content">
<h3 className="title">
<a href={dashUrl}>
Find more oprotunities at our marketplace.
</a>
</h3>
<a href="https://www.wrenchboard.com/login">
Login now <i className="fal fa-arrow-right" />
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</>
);
</section>
</>
);
}
}
export default RecentJobsOne;