-
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.
Refactor: Remove officename from employees page and styling :)
- Loading branch information
Showing
6 changed files
with
126 additions
and
139 deletions.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,58 @@ | ||
|
||
import Image from "next/image"; | ||
import { ChewbaccaEmployee } from "src/types/employees"; | ||
|
||
import styles from "./employeeComponent.module.css" | ||
import formatPhoneNumber from "../utils/formatPhoneNumber"; | ||
import Text from "src/components/text/Text"; | ||
import formatPhoneNumber from "src/components/utils/formatPhoneNumber"; | ||
import { ChewbaccaEmployee } from "src/types/employees"; | ||
|
||
import styles from "./employeeComponent.module.css"; | ||
import Link from "next/link"; | ||
import { aliasFromEmail } from "src/utils/employees"; | ||
|
||
export interface EmployeeComponentProps { | ||
consultant: ChewbaccaEmployee; | ||
employeePageSlug?: string; | ||
consultant: ChewbaccaEmployee; | ||
employeePageSlug?: string; | ||
language: string; | ||
} | ||
|
||
|
||
export default function EmployeeComponent({ | ||
consultant, | ||
employeePageSlug | ||
consultant, | ||
employeePageSlug, | ||
language | ||
}: EmployeeComponentProps) { | ||
|
||
return ( | ||
consultant.imageUrl && | ||
consultant.name && | ||
consultant.email && ( | ||
<div className={styles.peopleWrapper}> | ||
<div className={styles.peopleConsultantImage}> | ||
<Image | ||
src={consultant.imageUrl} | ||
alt="" | ||
style={{ objectFit: "cover" }} | ||
fill={true} | ||
/> | ||
</div> | ||
<div className={styles.peopleConsultantInfoWrapper}> | ||
|
||
<div className={styles.peopleConsultantInfo}> | ||
|
||
<p className={styles.peopleConsultantName}> | ||
{consultant.name} | ||
</p> | ||
|
||
{consultant.competences.map((competence) => ( | ||
<Text type="labelRegular" key={competence}> | ||
{competence} | ||
</Text> | ||
))} | ||
</div> | ||
|
||
|
||
<div className={styles.peopleContactInfo}> | ||
|
||
<p> | ||
{consultant.email} | ||
</p> | ||
{consultant.telephone && | ||
<p> | ||
{formatPhoneNumber(consultant.telephone)} | ||
</p> | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
|
||
return ( | ||
consultant.imageUrl && | ||
consultant.name && | ||
consultant.email && ( | ||
<div className={styles.peopleWrapper}> | ||
<Link href={`/${language}/${employeePageSlug}/${aliasFromEmail(consultant.email)}`}> | ||
<div className={styles.peopleConsultantImage}> | ||
<Image | ||
src={consultant.imageUrl} | ||
alt="" | ||
style={{ objectFit: "cover" }} | ||
fill={true} | ||
/> | ||
</div> | ||
</Link> | ||
<div className={styles.peopleConsultantInfoWrapper}> | ||
<div className={styles.peopleConsultantInfo}> | ||
<p className={styles.peopleConsultantName}>{consultant.name}</p> | ||
|
||
{consultant.competences.map((competence) => ( | ||
<Text type="labelRegular" key={competence}> | ||
{competence} | ||
</Text> | ||
))} | ||
</div> | ||
|
||
<div className={styles.peopleContactInfo}> | ||
<p>{consultant.email}</p> | ||
{consultant.telephone && ( | ||
<p>{formatPhoneNumber(consultant.telephone)}</p> | ||
)} | ||
</div> | ||
</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
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