feat(mentor): email all team members button on project detail
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -344,6 +344,25 @@ function ProjectDetailContent({ projectId }: { projectId: string }) {
|
|||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="space-y-4">
|
<CardContent className="space-y-4">
|
||||||
|
{(() => {
|
||||||
|
const emails = (project.teamMembers ?? [])
|
||||||
|
.map((m) => m.user.email)
|
||||||
|
.filter((e): e is string => !!e)
|
||||||
|
if (emails.length === 0) return null
|
||||||
|
const mailto = `mailto:${emails.join(',')}?subject=${encodeURIComponent(
|
||||||
|
`MOPC Mentorship — ${project.title}`,
|
||||||
|
)}`
|
||||||
|
return (
|
||||||
|
<div className="flex justify-end">
|
||||||
|
<Button variant="outline" size="sm" asChild>
|
||||||
|
<a href={mailto}>
|
||||||
|
<Mail className="mr-2 h-4 w-4" />
|
||||||
|
Email all team members
|
||||||
|
</a>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})()}
|
||||||
{/* Team Lead */}
|
{/* Team Lead */}
|
||||||
{teamLead && (
|
{teamLead && (
|
||||||
<div className="p-4 rounded-lg border bg-muted/30">
|
<div className="p-4 rounded-lg border bg-muted/30">
|
||||||
|
|||||||
Reference in New Issue
Block a user