feat: rename revokeInvite to deleteInvite and update related functionality

This commit is contained in:
shuaiplus
2026-06-29 11:47:05 +08:00
parent 4378e1b430
commit f82dcc3c17
15 changed files with 71 additions and 39 deletions
+4 -6
View File
@@ -16,7 +16,7 @@ interface AdminPageProps {
onDeleteAllInvites: () => Promise<void>;
onToggleUserStatus: (userId: string, currentStatus: 'active' | 'banned') => Promise<void>;
onDeleteUser: (userId: string) => Promise<void>;
onRevokeInvite: (code: string) => Promise<void>;
onDeleteInvite: (code: string) => Promise<void>;
}
export default function AdminPage(props: AdminPageProps) {
@@ -184,11 +184,9 @@ export default function AdminPage(props: AdminPageProps) {
>
<Clipboard size={14} className="btn-icon" /> {t('txt_copy_link')}
</button>
{invite.status === 'active' && (
<button type="button" className="btn btn-danger" onClick={() => void props.onRevokeInvite(invite.code)}>
<Trash2 size={14} className="btn-icon" /> {t('txt_revoke')}
</button>
)}
<button type="button" className="btn btn-danger" onClick={() => void props.onDeleteInvite(invite.code)}>
<Trash2 size={14} className="btn-icon" /> {t('txt_delete')}
</button>
</div>
</td>
</tr>