diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 00000000..f49d0739 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,19 @@ +name: build-test + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build-lint-test: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + cache-dependency-path: 'yarn.lock' + - run: yarn + - run: yarn build diff --git a/src/app/(routes)/student/jobs/[jobId]/page.tsx b/src/app/(routes)/student/jobs/[jobId]/page.tsx index 3cdd18da..c35bb743 100644 --- a/src/app/(routes)/student/jobs/[jobId]/page.tsx +++ b/src/app/(routes)/student/jobs/[jobId]/page.tsx @@ -1,7 +1,6 @@ "use client"; import React, { useEffect, useState } from "react"; import { Separator } from "@/components/ui/separator"; -import Link from "next/link"; import { Table, TableHeader, @@ -12,10 +11,10 @@ import { TableCell, } from "@/components/ui/table"; import { Button } from "@/components/ui/button"; -import { fetchEachJob } from "@/helpers/api"; import HorizontalTimeline from "@/components/HorizontalTimeline"; import { Job, CustomEvent, EventData, CalenderEvent } from "@/helpers/student/types"; import { GetJobById } from "@/helpers/student/api"; +import Cookies from "js-cookie"; function transformEvents(events: CustomEvent[]): EventData[] { @@ -96,7 +95,7 @@ const JobPage = ({ params }: { params: { jobId: string } }) => { useEffect(() => { const fetchJobData = async () => { - const data = await GetJobById(params.jobId); + const data = await GetJobById(params.jobId, Cookies.get("accessToken")); setJobData(data); storeCalenderEvents(data); }; @@ -122,7 +121,7 @@ const JobPage = ({ params }: { params: { jobId: string } }) => {