-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
137 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import LinkButton from "src/components/linkButton/LinkButton"; | ||
import Text from "src/components/text/Text"; | ||
import { CompanyLocation } from "studio/lib/interfaces/companyDetails"; | ||
import { IJobPosting } from "studio/lib/interfaces/jobPosting"; | ||
import { LinkType } from "studio/lib/interfaces/navigation"; | ||
|
||
import styles from "./jobPosting.module.css"; | ||
|
||
interface JobPostingProps { | ||
jobPosting: IJobPosting; | ||
} | ||
|
||
export default async function JobPosting({ jobPosting }: JobPostingProps) { | ||
const jobPostingLocations = jobPosting.locations | ||
.map((location: CompanyLocation) => location.companyLocationName) | ||
.join(", "); | ||
|
||
return ( | ||
<div className={styles.jobPosting}> | ||
<div className={styles.details}> | ||
<div className={styles.role}> | ||
<Text type={"h5"}>{jobPosting.role}</Text> | ||
</div> | ||
<div className={styles.locations}> | ||
<Text type={"bodyNormal"}>{jobPostingLocations}</Text> | ||
</div> | ||
</div> | ||
<LinkButton | ||
link={{ | ||
_key: "recruitee", | ||
_type: "link", | ||
linkType: LinkType.External, | ||
linkTitle: " ", | ||
newTab: true, | ||
url: jobPosting.recruiteeAdUrl, | ||
}} | ||
type="secondary" | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.jobPosting { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
border-radius: 24px; | ||
height: 64px; | ||
padding: 8px 24px; | ||
gap: 5rem; | ||
background-color: var(--text-primary-light); | ||
color: var(--text-primary); | ||
} | ||
|
||
.details { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.role { | ||
width: 250px; | ||
} | ||
|
||
.locations { | ||
padding: 6px 12px; | ||
border: solid; | ||
border-color: var(--text-primary); | ||
border-width: thin; | ||
border-radius: 24px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import JobPosting from "src/components/jobPosting/JobPosting"; | ||
import Text from "src/components/text/Text"; | ||
import { IJobPosting } from "studio/lib/interfaces/jobPosting"; | ||
import { JobsSection } from "studio/lib/interfaces/pages"; | ||
import { JOB_POSTINGS_QUERY } from "studio/lib/queries/admin"; | ||
import { loadStudioQuery } from "studio/lib/store"; | ||
|
||
import styles from "./jobs.module.css"; | ||
|
||
export interface JobsProps { | ||
language: string; | ||
section: JobsSection; | ||
} | ||
|
||
export default async function Jobs({ language, section }: JobsProps) { | ||
const { data: jobPostings } = await loadStudioQuery<IJobPosting[] | null>( | ||
JOB_POSTINGS_QUERY, | ||
{ | ||
language, | ||
}, | ||
); | ||
|
||
return ( | ||
<div className={styles.wrapper}> | ||
<div className={styles.titleSection}> | ||
<Text type={"h2"}>{section.basicTitle}</Text> | ||
<Text type={"bodyNormal"}>{section.subtitle}</Text> | ||
</div> | ||
<div className={styles.jobPostings}> | ||
{jobPostings?.jobPostingsArray?.map((jobPosting: IJobPosting) => ( | ||
<JobPosting jobPosting={jobPosting} key={jobPosting._key} /> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
padding: 32px 6px 6px 6px; | ||
max-width: 50%; | ||
margin: 5rem auto; | ||
border-radius: 6px; | ||
gap: 0.5rem; | ||
background-color: var(--Violet-700); | ||
color: var(--text-primary-light); | ||
} | ||
|
||
.titleSection { | ||
padding: 0px 24px; | ||
} | ||
|
||
.jobPostings { | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
text-wrap: wrap; | ||
gap: 0.5rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters