Skip to content

Commit

Permalink
fix: 🐛 should extend page data not overwrite (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida authored Dec 2, 2021
1 parent 556b8d8 commit 4e2d8b8
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/dashboard/src/hooks/store/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,19 @@ export const useAccountStore = create<AccountStore>((set, get) => ({
const contractPairedMetadata = await get().contractPairedMetadata;

// Update the pageData with the metadata
pageData = contractPairedMetadata.map(({
contractId,
metadata,
}) => ({
contractId,
dabCanister: {
pageData = [
...pageData,
...contractPairedMetadata.map(({
contractId,
metadata,
},
}));
}) => ({
contractId,
dabCanister: {
contractId,
metadata,
},
})),
];

await preloadPageDataImages({ pageData });

Expand Down

0 comments on commit 4e2d8b8

Please sign in to comment.