Skip to content

Commit

Permalink
resume issue fixed (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanGKulkarni authored Aug 2, 2024
1 parent 44a67c9 commit 69e0285
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app/(routes)/student/onCampus/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const StudentPage = () => {
<Loader />
</div>
)}
{onCampusOffers.length > 0 &&
{onCampusOffers &&
onCampusOffers.map((job) => (
<div key={job.id} className="my-3">
<OnCampusCard offerItem={job} salaryId={job.salary.id} />
Expand Down
21 changes: 11 additions & 10 deletions src/components/jobs/SalaryCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "@/components/ui/table";
import { Separator } from "@/components/ui/separator";
import { Resume, Salary } from "@/helpers/student/types";
import { ApplyJob, GetSalaryById } from "@/helpers/student/api";
import { ApplyJob, GetSalaryById, OpenResume } from "@/helpers/student/api";
import { Button } from "../ui/button";
import toast from "react-hot-toast";
import {
Expand Down Expand Up @@ -71,6 +71,10 @@ export default function SalaryCard({ salaryId, resumes }: Props) {
}
};

const handleOpenResume = async (filename: string) => {
OpenResume(filename);
};

const [isopen, setIsopen] = useState(false);
const handleViewDetails = () => {
setIsopen(!isopen);
Expand Down Expand Up @@ -295,15 +299,12 @@ export default function SalaryCard({ salaryId, resumes }: Props) {
<TableRow key={index}>
<TableCell>{index + 1}</TableCell>
<TableCell>
<Link
className="my-1 p-2 text-blue-500 font-semibold cursor-pointer hover:text-blue-600 transition-all fade-in-out"
target="_blank"
href={url(
`/resumes/file/${application.resume.filepath}`,
)}
>
{application.resume.filepath}
</Link>
<div
className="my-1 p-2 text-blue-500 font-semibold cursor-pointer hover:text-blue-600 transition-all fade-in-out"
onClick={() => handleOpenResume(application.resume.filepath)}
>
{application.resume.filepath}
</div>
</TableCell>
<TableCell>
{application.resume.verified
Expand Down
1 change: 0 additions & 1 deletion src/helpers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ export const fetchRegistrationDataByIdAndSeason = async (
type: any,
year: boolean,
) => {
console.log(studentId);
return apiCall(`/registrations`, {
queryParam: {
q: {
Expand Down

0 comments on commit 69e0285

Please sign in to comment.