- Add slug/short_id fields to database with auto-generation
- Create migration script for existing data - Update admin interface to show only short URLs - Implement redirect system to avoid code duplication - Maintain backward compatibility with old URLs
This commit is contained in:
@@ -29,8 +29,10 @@ export default function SendParticipantEmailModal({
|
||||
const [sending, setSending] = useState(false);
|
||||
const [result, setResult] = useState<{ success: boolean; message: string } | null>(null);
|
||||
|
||||
// Générer le lien de vote
|
||||
const voteUrl = `${typeof window !== 'undefined' ? window.location.origin : ''}/campaigns/${campaign.id}/vote/${participant.id}`;
|
||||
// Générer le lien de vote (utiliser uniquement le lien court)
|
||||
const voteUrl = participant.short_id
|
||||
? `${typeof window !== 'undefined' ? window.location.origin : ''}/v/${participant.short_id}`
|
||||
: `${typeof window !== 'undefined' ? window.location.origin : ''}/v/EN_ATTENTE`;
|
||||
|
||||
// Initialiser le message par défaut quand le modal s'ouvre
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user