Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

fix(logo): add error handling for company logo image fallback

Khuram Niazc28daf98d2a3
diff --git a/src/components/admin/CompaniesTable.tsx b/src/components/admin/CompaniesTable.tsx
index 57f3cce..0852886 100644
--- a/src/components/admin/CompaniesTable.tsx
+++ b/src/components/admin/CompaniesTable.tsx
@@ -108,6 +108,10 @@ function CompaniesTable({
alt="Company logo"
className="w-8 h-8 rounded-md object-cover"
src={company.logoUrl || "/images/jobsync-logo.svg"}
+ onError={(e) => {
+ e.currentTarget.onerror = null;
+ e.currentTarget.src = "/images/jobsync-logo.svg";
+ }}
/>
</TableCell>
<TableCell className="font-medium">{company.label}</TableCell>
diff --git a/src/components/myjobs/MyJobsTable.tsx b/src/components/myjobs/MyJobsTable.tsx
index f263bd8..10fef49 100644
--- a/src/components/myjobs/MyJobsTable.tsx
+++ b/src/components/myjobs/MyJobsTable.tsx
@@ -100,6 +100,10 @@ function MyJobsTable({
alt="Company logo"
className="aspect-square rounded-md object-cover h-8 w-8"
src={job.Company?.logoUrl || "/images/jobsync-logo.svg"}
+ onError={(e) => {
+ e.currentTarget.onerror = null;
+ e.currentTarget.src = "/images/jobsync-logo.svg";
+ }}
/>
</TableCell>
<TableCell className="hidden md:table-cell w-[120px] whitespace-nowrap">