- {job.companyLogo ? (
- job.companyLogo === 'https://www.example.com' ? (
-
-
-
- ) : (
-
- )
- ) : null}
+ {job.companyLogo && (
+
+ )}
@@ -60,51 +50,37 @@ export default function JobCard({
{_.startCase(job.type)}
-
- {job.minExperience && job.maxExperience
- ? `${job.minExperience}-${job.maxExperience} Yrs`
- : 'Not disclosed'}
+ {job.minSalary && job.maxSalary ? (
+
+
+ {`${formatSalary(job.minSalary)}-${formatSalary(job.maxSalary)}`}
+
+ ) : (
+ 'Not disclosed'
+ )}
-
- {job.minSalary && job.maxSalary
- ? `${formatSalary(job.minSalary)}-${formatSalary(job.maxSalary)}`
- : 'Not disclosed'}
+ {job.minExperience && job.maxExperience ? (
+
+
+
+ {`${job.minExperience}-${job.maxExperience} Yrs`}
+
+ ) : (
+ 'Ex: Not disclosed'
+ )}
+
- {job.address}
- ({job.workMode})
+ {job.city} -
+
+ {job.workMode}
+
-
- {job.skills && job.skills.length !== 0 ? (
- !(job.skills.length > 4) ? (
- // If there are more than 3 skills, show them all
- job.skills.map((item, index) => (
-
- {item}
-
- ))
- ) : (
- job.skills.slice(0, 7).map((item, index) => (
-
- {item}
-
- ))
- )
- ) : (
- // If there are no skills, show the "No skills provided" message
-
- )}
+
+
);
diff --git a/src/components/RecentJobs.tsx b/src/components/RecentJobs.tsx
index c2655b77..bb16731f 100644
--- a/src/components/RecentJobs.tsx
+++ b/src/components/RecentJobs.tsx
@@ -10,7 +10,7 @@ export default async function RecentJobs() {
return (
{recentJobs.additional.recentJobs.map((job, index) => (
-
+
))}
);
diff --git a/src/components/job-card-loader.tsx b/src/components/job-card-loader.tsx
deleted file mode 100644
index 2ae82b45..00000000
--- a/src/components/job-card-loader.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { Skeleton } from '@/components/ui/skeleton';
-import React from 'react';
-
-const JobCardLoader = () => {
- return (
-
- );
-};
-
-export default JobCardLoader;
diff --git a/src/components/job-card.tsx b/src/components/job-card-rec.tsx
similarity index 95%
rename from src/components/job-card.tsx
rename to src/components/job-card-rec.tsx
index cd217597..e7f88798 100644
--- a/src/components/job-card.tsx
+++ b/src/components/job-card-rec.tsx
@@ -8,7 +8,6 @@ import _ from 'lodash';
export default function JobCard({ job }: { job: JobType }) {
return (
- {/* job card */}
@@ -37,7 +36,7 @@ export default function JobCard({ job }: { job: JobType }) {
- {job.address} ({_.startCase(job.workMode)})
+ {job.address} - {_.startCase(job.workMode)}
diff --git a/src/components/job-skills.tsx b/src/components/job-skills.tsx
new file mode 100644
index 00000000..c3fbb187
--- /dev/null
+++ b/src/components/job-skills.tsx
@@ -0,0 +1,34 @@
+import { JobType } from '@/types/jobs.types';
+import icons from '@/lib/icons';
+type JobSkillsProps = Pick
;
+export const JobSkills = ({ skills }: JobSkillsProps) => {
+ const maxSkills = 6;
+
+ if (skills.length === 0) {
+ return ;
+ }
+ const displayedSkills = skills.slice(0, maxSkills);
+ const remainingSkillsCount = skills.length - maxSkills;
+ return (
+
+ {displayedSkills.map((skill, index) => (
+
+ ))}
+ {remainingSkillsCount > 0 && (
+
+ +{remainingSkillsCount} more
+
+ )}
+
+ );
+};
+const NoSkills = () => (
+
+ No skills provided
+
+);
+const SkillTag = ({ skill }: { skill: string }) => (
+
+ {skill}
+
+);
diff --git a/src/components/job.tsx b/src/components/job.tsx
index 2b942023..38b6202f 100644
--- a/src/components/job.tsx
+++ b/src/components/job.tsx
@@ -4,7 +4,8 @@ import Icon from './ui/icon';
import { formatSalary } from '@/lib/utils';
import { Button } from './ui/button';
import Image from 'next/image';
-import { MapPin } from 'lucide-react';
+import { Briefcase, MapPin } from 'lucide-react';
+import Link from 'next/link';
import { Twitter } from 'lucide-react';
import Linkify from 'linkify-react';
const options = {
@@ -26,21 +27,15 @@ export const Job = ({ job }: { job: JobType }) => {
- {job.companyLogo ? (
- job.companyLogo === 'https://www.example.com' ? (
-
- hi
-
- ) : (
-
- )
- ) : null}
+ {job.companyLogo && (
+
+ )}
{job.title}
@@ -57,11 +52,23 @@ export const Job = ({ job }: { job: JobType }) => {
- {!!job.minSalary && }
+
{job.minSalary && job.maxSalary
? `${formatSalary(job.minSalary)}-${formatSalary(job.maxSalary)}`
: 'Not disclosed'}
+
+ {job.minExperience && job.maxExperience ? (
+
+
+
+ {`${job.minExperience}-${job.maxExperience} Yrs`}
+
+ ) : (
+ 'Ex: Not disclosed'
+ )}
+
+
{job.address}
@@ -85,14 +92,15 @@ export const Job = ({ job }: { job: JobType }) => {
-
- Apply Now
-
-
+
+
+ Apply Now
+
+
Share on
diff --git a/src/lib/icons.ts b/src/lib/icons.ts
index 0e98d835..f8af6351 100644
--- a/src/lib/icons.ts
+++ b/src/lib/icons.ts
@@ -24,6 +24,7 @@ import {
User,
LogOut,
SlidersHorizontal,
+ AlertCircle,
} from 'lucide-react';
const icons = {
sparcle: Sparkles,
@@ -48,6 +49,7 @@ const icons = {
profile: User,
logout: LogOut,
filter: SlidersHorizontal,
+ alert: AlertCircle,
};
export type IconType = typeof LucideIconType;
export default icons;
diff --git a/src/types/jobs.types.ts b/src/types/jobs.types.ts
index 39f08715..572e3210 100644
--- a/src/types/jobs.types.ts
+++ b/src/types/jobs.types.ts
@@ -16,6 +16,7 @@ export type JobType = {
description: string | null;
companyName: string;
postedAt: Date;
+ application?: string;
};
export type getAllJobsAdditonalType = {
jobs: JobType[];