-
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.
cleanup in variablenames and styling
- Loading branch information
Showing
13 changed files
with
194 additions
and
201 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"i18n-ally.localesPaths": ["i18n", "messages", "src/i18n"] | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
import Text from "src/components/text/Text"; | ||
import formatPhoneNumber from "src/components/utils/formatPhoneNumber"; | ||
import { ChewbaccaEmployee } from "src/types/employees"; | ||
import { aliasFromEmail } from "src/utils/employees"; | ||
|
||
import styles from "./employeeCard.module.css"; | ||
|
||
export interface EmployeeCardProps { | ||
employee: ChewbaccaEmployee; | ||
employeePageSlug?: string; | ||
language: string; | ||
} | ||
|
||
export default function EmployeeCard({ | ||
employee, | ||
employeePageSlug, | ||
language, | ||
}: EmployeeCardProps) { | ||
return ( | ||
employee.imageUrl && | ||
employee.name && | ||
employee.email && ( | ||
<div className={styles.employeeWrapper}> | ||
<Link | ||
href={`/${language}/${employeePageSlug}/${aliasFromEmail(employee.email)}`} | ||
> | ||
<div className={styles.employeeImage}> | ||
<Image | ||
src={employee.imageUrl} | ||
alt="" | ||
style={{ objectFit: "cover" }} | ||
fill={true} | ||
/> | ||
</div> | ||
</Link> | ||
<div className={styles.employeeInfoWrapper}> | ||
<div className={styles.employeeInfo}> | ||
<p className={styles.employeeName}>{employee.name}</p> | ||
<div className={styles.employeeRole}> | ||
{employee.competences.map((competence) => ( | ||
<> | ||
<Text | ||
className={styles.employeeRoleDot} | ||
type="labelRegular" | ||
key={competence} | ||
> | ||
{competence} | ||
</Text> | ||
</> | ||
))} | ||
</div> | ||
</div> | ||
|
||
<div className={styles.employeeContactInfo}> | ||
<p>{employee.email}</p> | ||
{employee.telephone && ( | ||
<p>{formatPhoneNumber(employee.telephone)}</p> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
); | ||
} |
Oops, something went wrong.