From 4be4184b6748f007803de5c9eeefd39f7c58facb Mon Sep 17 00:00:00 2001 From: Martina Babinska Date: Wed, 1 Nov 2023 22:33:10 +0100 Subject: [PATCH] sorting candidates list, matching score - round to the whole number, tooltip subst. for HtmlTooltip designed --- frontend/package.json | 2 +- frontend/src/app/(site)/company/candidates/page.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index a60d475..64f68fa 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,7 +10,7 @@ "format": "npx prettier . --write", "post-update": "echo \"codesandbox preview only, need an update\" && yarn upgrade --latest", "gcbuild": "gcloud builds submit --tag gcr.io/enter-400508/nextjsapp --project enter-400508 .", - "gcdeploy": "gcloud run deploy nextjsapp --image gcr.io/enter-400508/nextjsapp --project enter-400508" + "gcdeploy": "gcloud run deploy nextjsapp --image gcr.io/enter-400508/nextjsapp --project enter-400508 --region europe-west1" }, "dependencies": { "@emotion/cache": "latest", diff --git a/frontend/src/app/(site)/company/candidates/page.tsx b/frontend/src/app/(site)/company/candidates/page.tsx index aa442b5..0e6ce27 100644 --- a/frontend/src/app/(site)/company/candidates/page.tsx +++ b/frontend/src/app/(site)/company/candidates/page.tsx @@ -10,6 +10,7 @@ import { useMatchedCandidates } from "@/app/(site)/company/candidates/useMatched import { CandidateForJobList } from "@/app/(site)/company/candidates/types"; import { CircularProgress } from "@mui/material"; import { SignInProviderContext } from "@/components/providers/SignInProvider"; +import { useSearchParams } from "next/navigation"; import IFuseOptions = Fuse.IFuseOptions; const options: IFuseOptions = { @@ -26,9 +27,10 @@ const options: IFuseOptions = { ], }; -export default function CandidatesPage(ctx: any) { +export default function CandidatesPage() { + const searchParams = useSearchParams(); const [searchTerm, setSearchTerm] = useState(""); - const jobId = ctx.searchParams.jobid || "all"; + const jobId = searchParams.get("jobid") || "all"; const signInContext = useContext(SignInProviderContext); const { data: listOfCandidates = [], isLoading } = useMatchedCandidates( jobId,