find sessions for loginHint, send to select account

This commit is contained in:
peintnermax
2023-08-29 14:43:51 +02:00
parent 8056c81161
commit 338c28cd88
6 changed files with 120 additions and 34 deletions

View File

@@ -7,9 +7,10 @@ import { useEffect, useState } from "react";
type Props = {
sessions: Session[];
authRequestId?: string;
};
export default function SessionsList({ sessions }: Props) {
export default function SessionsList({ sessions, authRequestId }: Props) {
const [list, setList] = useState<Session[]>(sessions);
return sessions ? (
<div className="flex flex-col space-y-2">
@@ -19,6 +20,7 @@ export default function SessionsList({ sessions }: Props) {
return (
<SessionItem
session={session}
authRequestId={authRequestId}
reload={() => {
setList(list.filter((s) => s.id !== session.id));
}}