Skip to content

Commit 012645e

Browse files
authored
Create README.md
1 parent 640c0bd commit 012645e

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Social Media Dashboard
2+
3+
## 🛠 Tools used
4+
5+
[![My Skills](https://skillicons.dev/icons?i=html,css,js,react,npm,webpack,vscode)](https://skillicons.dev)
6+
7+
## Introduction
8+
9+
This project is a comprehensive social media dashboard composed of several key components that demonstrate fundamental concepts in React development. Each component has been carefully designed to handle specific data structures, styled using modern CSS techniques, and tested to ensure they meet the project requirements. The dashboard includes a user profile display, a statistics section, a friend list, and a transaction history table, all driven by JSON data files.
10+
11+
## Components Overview
12+
13+
### 1. Profile Component
14+
15+
The `Profile` component displays user information for a social media account. The component takes in several props to render details such as the username, social media tag, location, avatar, and activity statistics. These data are stored in the `user.json` file.
16+
17+
**Key Features:**
18+
- Displays the user's avatar, name, and location.
19+
- Shows user activity statistics like followers, views, and likes.
20+
- Utilizes a structured layout with CSS for a clean and responsive design.
21+
22+
**Example Usage:**
23+
```jsx
24+
import user from 'path/to/user.json';
25+
26+
<Profile
27+
username={user.username}
28+
tag={user.tag}
29+
location={user.location}
30+
avatar={user.avatar}
31+
stats={user.stats}
32+
/>
33+
```
34+
35+
### 2. Statistics Component
36+
37+
The `Statistics` component is designed to display a variety of statistics based on the provided data. The data is passed as props, allowing the component to dynamically render the statistics. The title prop is optional, and the stats prop contains an array of statistical data stored in `data.json`.
38+
39+
**Key Features:**
40+
- Renders a title for the statistics section if provided.
41+
- Displays each statistic with a label and percentage.
42+
- Includes the option to dynamically generate background colors for each statistic.
43+
44+
**Example Usage:**
45+
```jsx
46+
import data from 'path/to/data.json';
47+
48+
<Statistics title="Upload stats" stats={data} />
49+
<Statistics stats={data} />
50+
```
51+
52+
### 3. FriendList Component
53+
54+
The `FriendList` component shows a list of the user's friends, with each friend's online status clearly indicated. This component accepts a `friends` prop, which is an array of objects representing each friend, stored in `friends.json`.
55+
56+
**Key Features:**
57+
- Displays each friend’s avatar, name, and online status.
58+
- Changes the background color of the status indicator based on whether the friend is online or offline.
59+
- Renders a flexible list that can accommodate any number of friends.
60+
61+
**Example Usage:**
62+
```jsx
63+
import friends from 'path/to/friends.json';
64+
65+
<FriendList friends={friends} />
66+
```
67+
68+
### 4. TransactionHistory Component
69+
70+
The `TransactionHistory` component displays a table of financial transactions, ideal for tracking activities in an internet banking application. The transactions are passed in as the `items` prop, sourced from the `transactions.json` file.
71+
72+
**Key Features:**
73+
- Renders a table format with headers for transaction type, amount, and currency.
74+
- Supports a variety of transaction types, amounts, and currencies.
75+
- Provides a clean and accessible layout.
76+
77+
**Example Usage:**
78+
```jsx
79+
import transactions from 'path/to/transactions.json';
80+
81+
<TransactionHistory items={transactions} />
82+
```
83+
84+
## What I Learned
85+
86+
Through the development of these components, I gained valuable insights into React's component-based architecture, prop handling, and state management. I improved my understanding of how to efficiently structure and pass data between components using JSON files. Additionally, I enhanced my skills in CSS styling, particularly in creating responsive and visually appealing user interfaces.
87+
88+
Working on this project also taught me the importance of modular design and the reusability of components. By separating concerns and organizing the codebase into distinct, manageable parts, I was able to maintain clarity and reduce complexity as the project scaled.

0 commit comments

Comments
 (0)