Yvonne Priscilla commited on
Commit ·
84f95f9
1
Parent(s): 58a84ad
fix bug
Browse files
src/components/dashboard/candidates-table.tsx
CHANGED
|
@@ -1022,7 +1022,7 @@ const CalculateScoreDialog = memo(({
|
|
| 1022 |
|
| 1023 |
return (
|
| 1024 |
<Dialog open={open} onOpenChange={onOpenChange}>
|
| 1025 |
-
<DialogContent className="flex flex-col" size="3xl">
|
| 1026 |
<DialogHeader className="flex-shrink-0">
|
| 1027 |
<DialogTitle>Calculate Score</DialogTitle>
|
| 1028 |
</DialogHeader>
|
|
@@ -1290,7 +1290,7 @@ export default function CandidateTable() {
|
|
| 1290 |
})
|
| 1291 |
|
| 1292 |
// ✅ Candidates — always fresh, refetches on any param change
|
| 1293 |
-
const { data: candidatesData, isLoading, refetch } = useQuery({
|
| 1294 |
queryKey: ["cv-profiles", currentPage, debouncedSearch, sortConfig, appliedFilters, user, criteriaId],
|
| 1295 |
queryFn: () => fetchCandidates(currentPage, debouncedSearch, sortConfig, appliedFilters, criteriaId, user?.user_id ?? ""),
|
| 1296 |
staleTime: 0, // always fresh
|
|
@@ -1413,7 +1413,7 @@ export default function CandidateTable() {
|
|
| 1413 |
|
| 1414 |
<div className="border rounded-lg overflow-hidden">
|
| 1415 |
<div className="overflow-x-auto">
|
| 1416 |
-
{isLoading ? (
|
| 1417 |
<div className="flex items-center justify-center py-16">
|
| 1418 |
<div className="size-8 border-4 border-green-600 border-t-transparent rounded-full animate-spin" />
|
| 1419 |
</div>
|
|
|
|
| 1022 |
|
| 1023 |
return (
|
| 1024 |
<Dialog open={open} onOpenChange={onOpenChange}>
|
| 1025 |
+
<DialogContent className="flex flex-col max-h-[90vh] h-[90vh]" size="3xl">
|
| 1026 |
<DialogHeader className="flex-shrink-0">
|
| 1027 |
<DialogTitle>Calculate Score</DialogTitle>
|
| 1028 |
</DialogHeader>
|
|
|
|
| 1290 |
})
|
| 1291 |
|
| 1292 |
// ✅ Candidates — always fresh, refetches on any param change
|
| 1293 |
+
const { data: candidatesData, isLoading, refetch, isFetching } = useQuery({
|
| 1294 |
queryKey: ["cv-profiles", currentPage, debouncedSearch, sortConfig, appliedFilters, user, criteriaId],
|
| 1295 |
queryFn: () => fetchCandidates(currentPage, debouncedSearch, sortConfig, appliedFilters, criteriaId, user?.user_id ?? ""),
|
| 1296 |
staleTime: 0, // always fresh
|
|
|
|
| 1413 |
|
| 1414 |
<div className="border rounded-lg overflow-hidden">
|
| 1415 |
<div className="overflow-x-auto">
|
| 1416 |
+
{isLoading || isFetching ? (
|
| 1417 |
<div className="flex items-center justify-center py-16">
|
| 1418 |
<div className="size-8 border-4 border-green-600 border-t-transparent rounded-full animate-spin" />
|
| 1419 |
</div>
|