36 lines
876 B
TypeScript
36 lines
876 B
TypeScript
/**
|
|
* Sessions page — "Revoke All Other Sessions" button.
|
|
*/
|
|
import { Button } from '@/components/ui/button';
|
|
import { LoadingSpinner } from '@/components/ui/loading-spinner';
|
|
import { LogOut } from 'lucide-react';
|
|
|
|
interface SessionsPageRevokeAllButtonProps {
|
|
disabled: boolean;
|
|
loading: boolean;
|
|
onClick: () => void;
|
|
}
|
|
|
|
export function SessionsPageRevokeAllButton({
|
|
disabled,
|
|
loading,
|
|
onClick,
|
|
}: SessionsPageRevokeAllButtonProps) {
|
|
return (
|
|
<div className="flex justify-end">
|
|
<Button onClick={onClick} disabled={disabled} variant="destructive">
|
|
{loading ? (
|
|
<>
|
|
<LoadingSpinner className="mr-2 h-4 w-4" />
|
|
Revoking...
|
|
</>
|
|
) : (
|
|
<>
|
|
<LogOut className="mr-2 h-4 w-4" />
|
|
Revoke All Other Sessions
|
|
</>
|
|
)}
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|