⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.
TypeScript agenticagileai-agentsbug-reportingbug-trackerganttissue-trackerjirajira-alternativekanbanlinearlinear-alternativeopen-sourceproduct-managementproject-managementroadmapself-hostedsprint-planningteam-collaborationtrello-alternative
'use client';
import { MailCheck } from 'lucide-react';
import { toast } from 'sonner';
import { useTranslations } from 'next-intl';
import { Button } from '@/components/ui/button';
import { useVerifyInstanceUserEmail } from '../../services/god.service';
// Confirms an account's email address on the owner's behalf, for a user who cannot
// open the confirmation link (no mail provider, a lost message, a manual signup).
export default function GodUserVerifyButton({ userId }: { userId: string }) {
const t = useTranslations('god.userPanel');
const verify = useVerifyInstanceUserEmail();
async function run() {
try {
await verify.mutateAsync(userId);
toast.success(t('verifyDone'));
} catch {
// The failure already surfaced through the global mutation error toast.
}
}
return (
<Button
variant="outline"
size="sm"
disabled={verify.isPending}
onClick={(e) => {
e.stopPropagation();
void run();
}}
>
<MailCheck />
{verify.isPending ? t('verifying') : t('verify')}
</Button>
);
}