chore: sync infra docs and coverage
Some checks failed
CI / Backend Tests (push) Failing after 2m41s
CI / Frontend Tests (push) Successful in 2m14s
CI / Build Docker Images (push) Has been skipped

This commit is contained in:
2025-10-16 22:41:22 -05:00
parent a553b14017
commit 252775faf3
109 changed files with 29696 additions and 208 deletions

View File

@@ -14,7 +14,13 @@ const Jobs = () => {
experienceLevel: ''
});
const { data, isLoading, refetch } = useQuery(['jobs', filters], async () => {
const {
data,
isLoading,
isError,
error,
refetch
} = useQuery(['jobs', filters], async () => {
const params = new URLSearchParams();
Object.entries(filters).forEach(([key, value]) => {
if (value) params.append(key, value);
@@ -55,7 +61,27 @@ const Jobs = () => {
if (isLoading) {
return (
<div className="flex items-center justify-center h-64">
<div className="animate-spin rounded-full h-32 w-32 border-b-2 border-primary-600"></div>
<div
role="status"
aria-label="Loading jobs"
className="animate-spin rounded-full h-32 w-32 border-b-2 border-primary-600"
></div>
</div>
);
}
if (isError) {
return (
<div className="flex flex-col items-center justify-center h-64 text-center space-y-3">
<h2 className="text-xl font-semibold text-gray-800">Unable to load jobs</h2>
<p className="text-sm text-gray-500">{error?.message || 'Please try again later.'}</p>
<button
type="button"
onClick={() => refetch()}
className="btn btn-primary"
>
Retry
</button>
</div>
);
}
@@ -69,10 +95,6 @@ const Jobs = () => {
Find your next career opportunity
</p>
</div>
{/* Debug info */}
<div className="text-xs text-gray-500 mb-2">
Debug: User role = {user?.role || 'undefined'}
</div>
{(user?.role === 'employer' || user?.role === 'recruiter') && (
<Link
to="/jobs/create"