mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-17 01:50:47 -04:00
MOREE!!!!
This commit is contained in:
@@ -5,6 +5,7 @@ import { useState } from 'react';
|
||||
import NicknameForm from '../NicknameForm/index.jsx';
|
||||
import CardFrame from '../CardFrame/index.jsx';
|
||||
import { flowWrapClass, innerFlowClass, fieldClass } from './constants.js';
|
||||
import { trackAnalyticsEvent } from '../../analytics/index.js';
|
||||
|
||||
export default function VipVerificationCard({
|
||||
pendingRequestId,
|
||||
@@ -25,6 +26,7 @@ export default function VipVerificationCard({
|
||||
setRequestKeyInput(currentStoredKey);
|
||||
setConfirmNickname(false);
|
||||
onMessage?.('');
|
||||
trackAnalyticsEvent('vip_verify_flow_start', { hasNickname: Boolean(nickname) });
|
||||
};
|
||||
|
||||
const cancelRequestFlow = () => {
|
||||
@@ -44,6 +46,10 @@ export default function VipVerificationCard({
|
||||
}
|
||||
setWorking(true);
|
||||
onMessage?.('');
|
||||
trackAnalyticsEvent('vip_verify_attempt', {
|
||||
hasNickname: Boolean(nickname),
|
||||
hasIdentityKey: Boolean(requestKeyInput),
|
||||
});
|
||||
try {
|
||||
const applied = await applyIdentityKey(requestKeyInput);
|
||||
await requestVerification?.();
|
||||
@@ -51,7 +57,9 @@ export default function VipVerificationCard({
|
||||
setRequestFlowStep(0);
|
||||
setConfirmNickname(false);
|
||||
onMessage?.('Verification request sent to lockdown admins.');
|
||||
trackAnalyticsEvent('vip_verify_result', { status: 'accepted' });
|
||||
} catch (err) {
|
||||
trackAnalyticsEvent('vip_verify_result', { status: 'failed', reason: err?.message || 'unknown' });
|
||||
onMessage?.(err.message || 'Failed to submit request.');
|
||||
} finally {
|
||||
setWorking(false);
|
||||
|
||||
Reference in New Issue
Block a user