fix: handle duplicate edge case for sidebar loading

This changes the SideBar's data prop to be filtered by id instead of key.

fixes issue #308
This commit is contained in:
Adam Rashid
2023-02-07 21:35:13 +08:00
parent 13838861fb
commit a37cf91702

View File

@@ -549,7 +549,7 @@ export default function Dashboard() {
toggleSidebar={toggleSidebar}
data={data.filter(
(row: SecretDataProps) =>
row.key === data.filter((r) => r.id === sidebarSecretId)[0]?.key
row.id === sidebarSecretId
)}
modifyKey={listenChangeKey}
modifyValue={listenChangeValue}