File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import jobsCategories from "../../data/jobsCategories.json";
44import JobCardCategory from " ./jobCardCategory.astro" ;
55
66const { job } = Astro .props ;
7- const job_categories = (job .categories ?? " " ) .split (" ," ) .map (x => x .trim ()) .filter (Boolean );
87const jobUrl = ` /empleos/${job .pubDate }/${job .slug } ` ;
98
109const locationLabel = job .location ? job .location : " Presencial" ;
@@ -52,7 +51,7 @@ const locationLabel = job.location ? job.location : "Presencial";
5251 )
5352 }
5453 {
55- job .parttime && (
54+ job .parttime != null && (
5655 <>
5756 <JobCardCategory text = { jobsCategories [" parttime" ].text } ico = " part-time" url = { jobsCategories [" parttime" ].slug } />
5857 <div class = " w-0.5 h-5 mr-1 bg-gray-400 place-self-center hidden md:block" />
@@ -84,7 +83,7 @@ const locationLabel = job.location ? job.location : "Presencial";
8483 )
8584 }
8685 {
87- job_categories .map ((category ) => (
86+ job . categories .map ((category ) => (
8887 <>
8988 <a
9089 href = { " /empleos/" + profileCategories [category ].slug }
Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ const { job } = Astro.props;
1111
1212const display_date = dayjs (job .pubDate ).format (" DD/MM/YY" );
1313
14- const job_categories = (job .categories ?? " " ) .split (" ," ) .map (x => x .trim ()) .filter (Boolean );
15-
1614if (
1715 job .organizationWebsite &&
1816 ! job .organizationWebsite .includes (" https://" ) &&
161159
162160 <div class =" flex flex-wrap justify-center md:justify-start" >
163161 {
164- job_categories .map ((category ) => (
162+ job . categories .map ((category ) => (
165163 <a
166164 href = { " /empleos/" + profileCategories [category ].slug }
167165 class = " inline my-1 rounded-md hover:bg-gray-100 bg-gray-50 text-gray-800 dark:hover:bg-gray-600 dark:bg-gray-700 dark:text-gray-100 font-normal text-sm py-1 px-2 mr-3 "
Original file line number Diff line number Diff line change @@ -72,13 +72,9 @@ if (job.freelance) {
7272 jobType = " Freelance" ;
7373}
7474
75- const job_categories = (job .categories ?? " " )
76- .split (" ," )
77- .map ((x ) => x .trim ())
78- .filter (Boolean );
7975let jobTitle = job .title ;
80- if (job_categories .length > 0 ) {
81- jobTitle = job_categories .map ((category ) => profileCategories [category ].text ).join (" , " );
76+ if (job . categories .length > 0 ) {
77+ jobTitle = job . categories .map ((category ) => profileCategories [category ].text ).join (" , " );
8278 if (jobType ) {
8379 jobTitle = jobType + " " + jobTitle ;
8480 }
You can’t perform that action at this time.
0 commit comments