diff --git a/src/components/jobs/JobCard.tsx b/src/components/jobs/JobCard.tsx index f911807d..91a84012 100644 --- a/src/components/jobs/JobCard.tsx +++ b/src/components/jobs/JobCard.tsx @@ -17,7 +17,7 @@ import { import { OnCampusOffers, Salary, Resume } from "@/helpers/student/types"; import { ApplyJob, GetSalaryById } from "@/helpers/student/api"; import Cookies from "js-cookie"; -import toast, { Toaster } from "react-hot-toast"; +import toast from "react-hot-toast"; interface Props { jobItem: OnCampusOffers; salaryId: string; @@ -29,7 +29,7 @@ const JobCard = ({ jobItem, salaryId, resumes }: Props) => { useEffect(() => { const fetchSalary = async () => { - const data = await GetSalaryById(salaryId); + const data = await GetSalaryById(salaryId, Cookies.get("accessToken")); setSalary(data); console.log(data); }; diff --git a/src/components/jobs/OffCampusCard.tsx b/src/components/jobs/OffCampusCard.tsx index 79500b2b..fb2ba907 100644 --- a/src/components/jobs/OffCampusCard.tsx +++ b/src/components/jobs/OffCampusCard.tsx @@ -1,22 +1,8 @@ import React from "react"; -import Link from "next/link"; import { Separator } from "../ui/separator"; -import { fetchJobSalary } from "@/helpers/api"; -import { cookies } from "next/headers"; import { useState, useEffect } from 'react'; -import {JobDetails} from "@/dummyData/jobdetails" import { Button } from "@/components/ui/button"; -import { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectLabel, - SelectTrigger, - SelectValue, -} from "@/components/ui/select" import { OffCampusOffer } from "@/helpers/student/types"; -import { GetSalaryById } from "@/helpers/student/api"; interface Props { jobItem: OffCampusOffer; } diff --git a/src/components/jobs/SalaryCard.tsx b/src/components/jobs/SalaryCard.tsx index 6c129f09..ab37cf89 100644 --- a/src/components/jobs/SalaryCard.tsx +++ b/src/components/jobs/SalaryCard.tsx @@ -4,15 +4,14 @@ import { Table, TableHeader, TableBody, - TableFooter, TableHead, TableRow, TableCell, } from "@/components/ui/table"; -import { SampleJobData } from "@/dummyData/job"; import { Separator } from "@/components/ui/separator"; import { Salary } from "@/helpers/student/types"; import { GetSalaryById } from "@/helpers/student/api"; +import Cookies from "js-cookie"; interface Props{ salaryId: string; @@ -23,7 +22,7 @@ export default function SalaryCard({salaryId}: Props) { useEffect(() => { const fetchSalaryData = async () => { - const data = await GetSalaryById(salaryId); + const data = await GetSalaryById(salaryId, Cookies.get("accessToken")); setSalaryData(data); };