Fix expansion state tracking in Server Notifications
This commit is contained in:
parent
21fd2f9da3
commit
6034ea36dc
1 changed files with 15 additions and 3 deletions
|
|
@ -110,15 +110,27 @@ const HistoryAndNotifications = ({
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="flex justify-between items-center cursor-pointer"
|
className="flex justify-between items-center cursor-pointer"
|
||||||
onClick={() => toggleNotificationExpansion(index)}
|
onClick={() =>
|
||||||
|
toggleNotificationExpansion(
|
||||||
|
serverNotifications.length - 1 - index,
|
||||||
|
)
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<span className="font-mono">
|
<span className="font-mono">
|
||||||
{serverNotifications.length - index}.{" "}
|
{serverNotifications.length - index}.{" "}
|
||||||
{notification.method}
|
{notification.method}
|
||||||
</span>
|
</span>
|
||||||
<span>{expandedNotifications[index] ? "▼" : "▶"}</span>
|
<span>
|
||||||
|
{expandedNotifications[
|
||||||
|
serverNotifications.length - 1 - index
|
||||||
|
]
|
||||||
|
? "▼"
|
||||||
|
: "▶"}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{expandedNotifications[index] && (
|
{expandedNotifications[
|
||||||
|
serverNotifications.length - 1 - index
|
||||||
|
] && (
|
||||||
<div className="mt-2">
|
<div className="mt-2">
|
||||||
<div className="flex justify-between items-center mb-1">
|
<div className="flex justify-between items-center mb-1">
|
||||||
<span className="font-semibold text-purple-600">
|
<span className="font-semibold text-purple-600">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue