diff --git a/app/people/[id]/page.tsx b/app/people/[id]/page.tsx index 8ebf035f1..c50f78e6c 100644 --- a/app/people/[id]/page.tsx +++ b/app/people/[id]/page.tsx @@ -46,13 +46,10 @@ async function Page({ params }: Props) { ); } -const PublicProfile = ({ - profile, - engagements, -}: { - profile: UserProfile; - engagements: TeamEngagement[]; -}) => ( +type Profile = { profile: UserProfile }; +type Engagements = { engagements: TeamEngagement[] }; + +const PublicProfile = ({ profile, engagements }: Profile & Engagements) => ( <>
@@ -62,7 +59,7 @@ const PublicProfile = ({ ); -const PrivateProfile = ({ profile }: { profile: UserProfile }) => ( +const PrivateProfile = ({ profile }: Profile) => ( <>
@@ -72,7 +69,7 @@ const PrivateProfile = ({ profile }: { profile: UserProfile }) => ( ); -const ContactSidebar = ({ profile }: { profile: UserProfile }) => { +const ContactSidebar = ({ profile }: Profile) => { const Button = ({ url, label }: { url: string; label: string }) => ( {label} @@ -96,7 +93,7 @@ const ContactSidebar = ({ profile }: { profile: UserProfile }) => { ); }; -const IntroSection = ({ profile }: { profile: UserProfile }) => { +const IntroSection = ({ profile }: Profile) => { return (

{profile.name}

@@ -106,7 +103,7 @@ const IntroSection = ({ profile }: { profile: UserProfile }) => { ); }; -const ProjectSection = ({ engagements }: { engagements: TeamEngagement[] }) => ( +const ProjectSection = ({ engagements }: Engagements) => (

Moje projekty

    @@ -129,7 +126,7 @@ const ProjectSection = ({ engagements }: { engagements: TeamEngagement[] }) => (
); -const Avatar = ({ profile }: { profile: UserProfile }) => { +const Avatar = ({ profile }: Profile) => { const avatarUrl = profile.slackAvatarUrl ?? "https://data.cesko.digital/people/generic-profile.jpg";