import React, { useState } from "react";
import { Link } from "react-router-dom";
import Layout from "../Partials/Layout";
import MyJobTable from "./MyJobTable";
import CommonHead from "../UserHeader/CommonHead";

export default function MyJobs(props) {
  const [selectTab, setValue] = useState("today");
  const filterHandler = (value) => {
    setValue(value);
  };
  console.log("AMEYE LOC1", props.MyJobList);
  return (
    <Layout>
      <CommonHead />
      <div className="notification-page w-full mb-10">
        <div className="notification-wrapper w-full">
          {/* heading */}
          <div className="sm:flex justify-between items-center mb-6">
            <div className="mb-5 sm:mb-0">
              <h1 className="text-26 font-bold flex items-center space-x-1  text-dark-gray dark:text-white gap-2">
                <span
                  className={`${selectTab === "today" ? "block" : "hidden"}`}
                >
                  My Jobs
                </span>

                <Link
                  to="/add-job"
                  className="text-white btn-gradient text-lg tracking-wide px-5 py-2 rounded-full"
                >
                  Add Job
                </Link>
              </h1>
            </div>
            <div className="slider-btns flex space-x-4">
              <div
                onClick={() => filterHandler("today")}
                className="relative"
              ></div>
            </div>
          </div>
          <MyJobTable MyJobList={props.MyJobList} reloadJobList={props.reloadJobList} />
        </div>
      </div>
    </Layout>
  );
}
