Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch JobOffer with Publishing Day #63

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions src/components/Jobs/JobOfferCard/JobOfferCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,17 @@ export const JobOfferCard: FC<{ jobOffer: JobOfferWithTags }> = ({
{jobOffer.companyName}
</div>
<div className="mb-1 flex flex-wrap gap-2 text-[10px] sm:text-xs">
{jobOffer.location && (
<div className="truncate rounded-lg border border-gray-300 py-[2px] px-1 dark:border-slate-600 dark:bg-slate-700">
📍 {jobOffer.location}
</div>
)}
<div className="truncate whitespace-pre rounded-lg border border-gray-300 py-[2px] px-1 dark:border-slate-600 dark:bg-slate-700">
{jobOffer.remote === RemoteKind.full && `🌎 Remoto`}
{jobOffer.remote === RemoteKind.no && `🖥️ In sede`}
{jobOffer.remote === RemoteKind.partial && `💻 Ibrido`}
</div>
<div className="truncate rounded-lg border border-gray-300 py-[2px] px-1 dark:border-slate-600 dark:bg-slate-700">
💰 {jobOffer.salaryRange}
</div>
<div
className={classNames(
"sm:text-md justify-self-end text-sm font-medium lg:mr-16",
{
"bg-gradient-brand bg-clip-text font-bold uppercase text-transparent":
dayjs(jobOffer.createdAt).fromNow(true) === "New",
}
)}
>
{dayjs(jobOffer.createdAt).fromNow(true)}
</div>
</div>
</div>
<div
Expand All @@ -76,17 +74,19 @@ export const JobOfferCard: FC<{ jobOffer: JobOfferWithTags }> = ({
limit={open ? undefined : 3}
/>
</div>
<div
className={classNames(
"sm:text-md justify-self-end text-sm font-medium lg:mr-16",
{
"bg-gradient-brand bg-clip-text font-bold uppercase text-transparent":
dayjs(jobOffer.createdAt).fromNow(true) === "New",
}
)}
>
{dayjs(jobOffer.createdAt).fromNow(true)}
</div>
{jobOffer.location && (
<div className="truncate rounded-lg border border-gray-300 py-[2px] px-1 dark:border-slate-600 dark:bg-slate-700">
📍 {jobOffer.location}
</div>
)}
<div className="truncate whitespace-pre rounded-lg border border-gray-300 py-[2px] px-1 dark:border-slate-600 dark:bg-slate-700">
{jobOffer.remote === RemoteKind.full && `🌎 Remoto`}
{jobOffer.remote === RemoteKind.no && `🖥️ In sede`}
{jobOffer.remote === RemoteKind.partial && `💻 Ibrido`}
</div>
<div className="truncate rounded-lg border border-gray-300 py-[2px] px-1 dark:border-slate-600 dark:bg-slate-700">
💰 {jobOffer.salaryRange}
</div>
<ChevronDownIcon
className={classNames(
"w-5 flex-shrink-0 transition-transform",
Expand Down