-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add meet-{teamMemberName} page to redirect to calendars if present
- Loading branch information
Showing
4 changed files
with
118 additions
and
60 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,29 @@ | ||
import { notFound, redirect } from 'next/navigation' | ||
|
||
import { teamMembers } from '@/constant/teamMembers' | ||
|
||
type MeetTeamMemberProps = { | ||
params: { | ||
calendarRedirect: string | ||
} | ||
} | ||
export function generateStaticParams() { | ||
return teamMembers | ||
.map((teamMember) => ({ | ||
calendarRedirect: teamMember.calendarRedirectSegment, | ||
})) | ||
.filter((url) => !!url) | ||
} | ||
|
||
export default function MeetTeamMember({ | ||
params: { calendarRedirect }, | ||
}: MeetTeamMemberProps) { | ||
const teamMember = teamMembers.find( | ||
(member) => member.calendarRedirectSegment === calendarRedirect, | ||
) | ||
if (!teamMember || !teamMember.calendarLink) { | ||
notFound() | ||
} else { | ||
redirect(teamMember.calendarLink) | ||
} | ||
} |
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,66 @@ | ||
import { TeamMember } from '@/constant/models' | ||
|
||
import KenoLogo from '~/svg/who-we-are-keno.svg' | ||
import PhilippLogo from '~/svg/who-we-are-philipp.svg' | ||
import TimoLogo from '~/svg/who-we-are-timo.svg' | ||
import TomLogo from '~/svg/who-we-are-tom.svg' | ||
export const teamMembers: TeamMember[] = [ | ||
{ | ||
name: 'Tom Graupner', | ||
logo: TomLogo, | ||
description: ( | ||
<> | ||
Co-Founder, Backend Developer | ||
<br /> | ||
and Cloud-Native Specialist | ||
</> | ||
), | ||
linkedInLink: 'https://www.linkedin.com/in/tom-graupner/', | ||
gitHubLink: 'https://github.com/tgraupne', | ||
calendarLink: 'https://calendar.app.google/KicY9pSkoYKqWzZP8', | ||
calendarRedirectSegment: 'meet-tom', | ||
}, | ||
{ | ||
name: 'Keno Dreßel', | ||
logo: KenoLogo, | ||
description: ( | ||
<> | ||
Co-Founder, Full-Stack Engineer | ||
<br /> | ||
and Machine Learning Specialist | ||
</> | ||
), | ||
linkedInLink: 'https://www.linkedin.com/in/kenodressel/', | ||
gitHubLink: 'https://github.com/kenodressel', | ||
calendarLink: 'https://calendar.app.google/vL9yUjz599Xcdx9q8', | ||
calendarRedirectSegment: 'meet-keno', | ||
}, | ||
{ | ||
name: 'Philipp Piwowarsky', | ||
logo: PhilippLogo, | ||
description: ( | ||
<> | ||
Co-Founder, Full-Stack Engineer | ||
<br /> | ||
and Blockchain Specialist | ||
</> | ||
), | ||
linkedInLink: 'https://www.linkedin.com/in/philipp-piwowarsky/', | ||
gitHubLink: 'https://github.com/thepiwo', | ||
calendarLink: 'https://calendar.app.google/eJDr4qYncBod3xsi7', | ||
calendarRedirectSegment: 'meet-philipp', | ||
}, | ||
{ | ||
name: 'Timo Erdelt', | ||
logo: TimoLogo, | ||
description: ( | ||
<> | ||
Full-Stack Engineer, Green IT, Functional | ||
<br /> | ||
Programming, User-Centered Design | ||
</> | ||
), | ||
linkedInLink: 'https://www.linkedin.com/in/timoerdelt/', | ||
gitHubLink: 'https://github.com/tmrdlt', | ||
}, | ||
] |