Skip to content

Commit

Permalink
React qull UI fixes (#422)
Browse files Browse the repository at this point in the history
* ui-fixes

* reset gmaps input

* react-quill-ui-fixes

* ui-fixes

* build-fixes
  • Loading branch information
aakash2330 authored Sep 29, 2024
1 parent 22e9964 commit 4b3549a
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 25 deletions.
5 changes: 5 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ const nextConfig = {
protocol: 'https',
hostname: 'wwww.example.com',
},

{
protocol: 'https',
hostname: 'aakash2330.b-cdn.net',
},
],
},
};
Expand Down
4 changes: 4 additions & 0 deletions src/actions/job.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export const getAllJobs = withServerActionAsyncCatcher<
description: true,
companyName: true,
city: true,
companyBio: true,
hasExperiencerange: true,
minExperience: true,
maxExperience: true,
Expand Down Expand Up @@ -165,6 +166,7 @@ export const getRecommendedJobs = withServerActionAsyncCatcher<
title: true,
description: true,
companyName: true,
companyBio: true,
city: true,
address: true,
category: true,
Expand Down Expand Up @@ -194,6 +196,7 @@ export const getRecommendedJobs = withServerActionAsyncCatcher<
title: true,
description: true,
companyName: true,
companyBio: true,
city: true,
address: true,
workMode: true,
Expand Down Expand Up @@ -278,6 +281,7 @@ export const getRecentJobs = async () => {
id: true,
title: true,
description: true,
companyBio: true,
companyName: true,
city: true,
address: true,
Expand Down
16 changes: 4 additions & 12 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -315,22 +315,16 @@

.ql-container.ql-snow {
border: none !important;
max-height: 56rem;
max-height: 30rem !important;
white-space: wrap !important;
width: '100%' !important;
/* Set a fixed height */
overflow-y: hidden;
overflow-y: scroll;
/* Hide vertical overflow */
overflow-x: auto;
/* Allow horizontal scrolling */
}

.ql-editor {
min-height: 10px;
overflow-y: hidden;
/* Prevent height increase */
white-space: nowrap;
/* Ensure long lines don't wrap */
}

.ql-editor.ql-blank::before {
color: #6b7280 !important;
}
Expand All @@ -354,11 +348,9 @@

/* Ensure long content does not wrap within the editor */
.job-description-editor .ql-editor {

white-space: nowrap !important;
overflow-x: hidden !important; /* Allow horizontal scrolling */
overflow-y: hidden !important; /* Hide vertical overflow */

}

.pac-container {
Expand Down
4 changes: 2 additions & 2 deletions src/components/job-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ const PostJobForm = () => {
type: EmployementType.Full_time,
category: 'design',
hasSalaryRange: true,
minSalary: 0,
maxSalary: 0,
minSalary: undefined,
maxSalary: undefined,
application: '',
},
});
Expand Down
33 changes: 22 additions & 11 deletions src/components/job.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ export const Job = ({ job }: { job: JobType }) => {
</div>

<span className="flex bg-green-500/20 font-bold rounded-lg px-4 py-1 text-green-500 text-xs md:text-sm items-center gap-0.5">
{job.minSalary && <Icon icon="currency" size={16} />}
{!!job.minSalary && <Icon icon="currency" size={16} />}
{job.minSalary && job.maxSalary
? `${formatSalary(job.minSalary)}-${formatSalary(job.maxSalary)}`
: 'Not disclosed'}
</span>

<div className="flex items-center gap-2">
<MapPin size={16} />
<p className="text-xs md:text-sm font-semibold">{job.address}</p>
</div>
</div>
</div>

<div className="flex items-center gap-2">
<MapPin size={16} />
<p className="text-xs md:text-sm font-semibold">{job.address}</p>
<div className="w-full md:max-w-[60%] flex-wrap flex justify-start items-center gap-2">
{job.skills.map((skill, index) => {
return (
Expand Down Expand Up @@ -92,16 +92,27 @@ export const Job = ({ job }: { job: JobType }) => {
</section>

{/* job description */}
<section className="border-2 bg-[#F1F5F9] dark:bg-[#0F172A] h-[10rem] p-6 rounded-xl">
<section className="border-2 bg-[#F1F5F9] dark:bg-[#0F172A] h-auto max-h-[20rem] overflow-y-auto p-6 rounded-xl">
<h1 className="font-extrabold px-4 py-1 w-fit text-white bg-blue-500/20 rounded-lg text-xl ">
Job Description
</h1>
<Linkify options={options}>
<p>{job.description}</p>
<div
className="my-4 text-neutral-100"
dangerouslySetInnerHTML={{ __html: job.description ?? '' }}
></div>
</Linkify>
</section>

{/* about company */}
<section className="border-2 bg-[#F1F5F9] dark:bg-[#0F172A] h-[10rem] p-6 rounded-xl">
<h1 className="font-bold">About {job.companyName}</h1>
<p className="my-4 text-sm text-gray-500">{job.description}</p>
<section className="border-2 bg-[#F1F5F9] dark:bg-[#0F172A] h-auto max-h-[15rem] overflow-y-auto p-6 rounded-xl">
<h1 className="font-extrabold px-4 py-1 w-fit text-white bg-blue-500/20 rounded-lg text-xl ">
About {job.companyName}
</h1>
<div
dangerouslySetInnerHTML={{ __html: job.companyBio ?? '' }}
className="my-4 text-neutral-200"
></div>
</section>
</aside>
);
Expand Down
1 change: 1 addition & 0 deletions src/types/jobs.types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export type JobType = {
companyLogo: string;
companyBio: string;
workMode: 'remote' | 'office' | 'hybrid';
city: string;
address: string;
Expand Down

0 comments on commit 4b3549a

Please sign in to comment.