import { AuthenticatedLayout } from "./AuthenticatedLayout.tsx"; export const SessionsPage = ({ sessions, currentSessionId, isAdmin = false, }: { sessions: any[]; currentSessionId: string; isAdmin?: boolean; }) => { return (

Active Sessions

Manage and revoke authenticated device sessions connected to your account.

{/* Desktop Table View (≥ 768px) */} {/* Mobile Adaptive Cards View (< 768px) */}
{sessions.length === 0 ? (

No active sessions found.

) : ( sessions.map((session) => { const isCurrent = session.id === currentSessionId; return (
{isCurrent ? "This Device" : "Remote Device"}
{session.id.substring(0, 13)}...
{isCurrent ? Active Now : Active}
Signed in:{" "} {new Date(session.created_at).toLocaleString()}
Expires:{" "} {new Date(session.expires_at).toLocaleString()}
{!isCurrent && ( )}
); }) )}
); };