Skip to content

include obj and properties in gitignore and update MainPage #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ dist-ssr
*.sw?

.vs/

# Ignore the obj and Properties directories
obj/
Properties/
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ I utilize third-party APIs for fetching live stock prices and other indicators f
- Utilizes React for state management, including user input validation before sending data to the server
- Implements cookie-based authentication to reduce the need for repeated sign-ins

#### BuyPage Component
The BuyPage component allows users to search for stock quotes, view their current portfolio, and purchase stocks.
It provides real-time stock data, calculates total costs, and ensures users have sufficient funds before completing transactions.

#### PageTransaction Component
The PageTransaction component displays a user's transaction history, including details such as transaction type, stock symbol, shares,
unit price, and total values. It also shows the user's current balance with an option to toggle its visibility.
#### Login Component
The Login component provides a simple user authentication interface, allowing users to enter their username and password to log in.
It displays success or error messages based on the login attempt and redirects the user to the main page upon successful authentication.

# <span style="color:red">START APPLICATION</span>

### For Client
Expand Down
6 changes: 6 additions & 0 deletions tradingwebapp.client/src/PageMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import { readUser } from './api-user';
import { readStock, Stock } from './api-stock';
import { lookup } from './api-quote';

//Hello Van Nguyen
/*
The MainApp page displays a user�s portfolio, showing their cash balance, stock holdings, total stock value,
and overall assets. It fetches data in real-time, calculates key metrics, and organizes stock details
in a table for easy viewing.
*/
const MainApp: React.FC = () => {
const [userData, setUserData] = useState<{ username: string; cash: number; } | null>(null);
const [stocks, setStocks] = useState<Stock[]>([]);
Expand Down
9 changes: 6 additions & 3 deletions tradingwebapp.client/src/assets/styles.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/* Size for brand */
/* Ensures the brand name appears prominently */
nav .navbar-brand {
font-size: xxx-large;
font-size: xxx-large;
}

/* Makes navigation links visually distinct */
.navbar-nav .nav-item .nav-link {
font-weight: bold;
font-size: x-large;
font-weight: bold;
font-size: x-large;
}

/* Colors for brand */
Expand All @@ -24,6 +26,7 @@ nav .navbar-brand .yellow {
nav .navbar-brand .green {
color: #2e944b;
}
/* Main content styling */
.Main {
margin-top: 15px;
margin-left: 20px;
Expand Down