shivamsouravjha / stock-frontend

https://www.stocksight.online/
9 stars 19 forks source link

add filter on ISIN and remove duplicate from same mutual funds #36

Closed bhavy3103 closed 1 month ago

bhavy3103 commented 1 month ago

try to solve the issue of duplicate stock entry in the same mutual funds. Update the googleLogin function and add a filter there to remove duplicate stocks using the filter on ISIN.

setStockDetails((prevDetails) => { const uniqueStocks = [...prevDetails, stockDetail].filter( (stock, index, self) => index === self.findIndex((s) => s.ISIN === stock.ISIN) ) return uniqueStocks; })

like above way

vercel[bot] commented 1 month ago

@bhavy3103 is attempting to deploy a commit to the shivamsouravjha's projects Team on Vercel.

A member of the Team first needs to authorize it.