-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
addition of stock holdings list to the website
- Loading branch information
1 parent
45f9cc9
commit 765f548
Showing
7 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// StockHoldingsList.js | ||
import React from 'react'; | ||
|
||
function StockHoldings() { | ||
console.log('Rendering StockHoldings'); | ||
const holdings = [ | ||
// Replace with your actual data and images | ||
{ name: 'S&P 500', quantity: 10, value: '$1000', imageUrl: './VAUG.png' }, | ||
{ name: 'Apple', quantity: 15, value: '$1500', imageUrl: './AAPL.png' }, | ||
{ name: 'Palantir', quantity: 15, value: '$1500', imageUrl: './PLTR.png' }, | ||
// ... more stocks | ||
]; | ||
|
||
return ( | ||
<div className="stock-holdings"> | ||
<h2>My Stock Holdings</h2> | ||
{holdings.map((stock, index) => ( | ||
<button key={index} className="stock-button"> | ||
<img src={stock.imageUrl} alt={stock.name} className="stock-image" /> | ||
<div className="stock-info"> | ||
<div className="stock-name">{stock.name}</div> | ||
<div>{`${stock.quantity} shares`}</div> | ||
<div>{`${stock.value}`}</div> | ||
</div> | ||
</button> | ||
))} | ||
</div> | ||
); | ||
} | ||
|
||
export default StockHoldings; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.