Herstel: uitnodigingslink bevat het admin-basispad
De frontend bouwde origin + inviteLink; op een host waar de root een aparte website is leidde de link naar die website. Nu origin + BASE_URL + pad via buildAppUrl. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useState } from 'react';
|
||||
import { buildAppUrl } from '@/lib/links';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
import { toast } from 'sonner';
|
||||
@@ -79,7 +80,7 @@ export function InviteUserDialog({ open, onOpenChange }: InviteUserDialogProps)
|
||||
|
||||
const handleCopy = async () => {
|
||||
if (!inviteLink) return;
|
||||
await navigator.clipboard.writeText(`${window.location.origin}${inviteLink}`);
|
||||
await navigator.clipboard.writeText(buildAppUrl(inviteLink));
|
||||
toast.success(t('users.actions.linkCopied'));
|
||||
};
|
||||
|
||||
@@ -163,7 +164,7 @@ export function InviteUserDialog({ open, onOpenChange }: InviteUserDialogProps)
|
||||
<div className="space-y-2">
|
||||
<Label>{t('users.invite.linkLabel')}</Label>
|
||||
<Input
|
||||
value={`${window.location.origin}${inviteLink ?? ''}`}
|
||||
value={inviteLink ? buildAppUrl(inviteLink) : ''}
|
||||
readOnly
|
||||
data-testid="invite-dialog-link-input"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user