Skip to content

Commit

Permalink
fix: handle duplicate edge case for sidebar loading
Browse files Browse the repository at this point in the history
This changes the SideBar's data prop to be filtered by id instead of key.

fixes issue #308
  • Loading branch information
RashidUjang committed Feb 7, 2023
1 parent 1383886 commit a37cf91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/dashboard/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit a37cf91

Please sign in to comment.