Skip to content

Commit a126df1

Browse files
committed
created user profile
1 parent 5c7e117 commit a126df1

8 files changed

Lines changed: 287 additions & 115 deletions

File tree

README.md

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +0,0 @@
1-
# TASKR (A HELPER FINDER APP)
2-
📌 Project Overview
3-
A taskr web application built with:
4-
5-
Frontend: React + Vite
6-
7-
Routing: React Router
8-
9-
Styling: Tailwind CSS
10-
11-
API: JSONPlaceholder (mock data) , Robohash
12-
13-
Live Demo: Deployed Link (Add your deployment link here)
14-
15-
#🚀 Features
16-
✅ Landing Page - Introduction to the app
17-
✅ Find Helper - Displays a list of helpers fetched from an API
18-
✅ Navigation - Smooth scrolling between sections
19-
✅ Authentication Pages - Login & Signup (UI only)
20-
21-
#🛠️ Installation & Setup
22-
1. Clone the Repository
23-
bash
24-
git clone https://github.com/Adonis-12/taskr.git
25-
cd helper-finder
26-
2. Install Dependencies
27-
bash
28-
npm install
29-
3. Run the Development Server
30-
bash
31-
npm run dev
32-
Open http://localhost:3000 in your browser.
33-
34-
#4. Build for Production
35-
bash
36-
npm run build
37-
38-
39-
#📂 Project Structure
40-
src/
41-
├── components/
42-
│ ├── navigation/ # Navigation bar
43-
│ ├── landingPage/ # Hero section
44-
│ ├── findHelper/ # Helper listing
45-
│ ├── footer/ # Footer
46-
│ ├── login/ # Login page
47-
│ └── signup/ # Signup page
48-
├── App.jsx # Main app & router setup
49-
├── main.jsx # Vite entry point
50-
└── styles/ # Global CSS (if any)
51-
52-
53-
#🔧 Key Code Implementation
54-
1. Data Fetching (API)
55-
Fetches mock users from JSONPlaceholder
56-
57-
Handles loading & error states
58-
59-
#jsx
60-
// Inside Home.jsx
61-
useEffect(() => {
62-
fetch('https://jsonplaceholder.typicode.com/users')
63-
.then((res) => res.json())
64-
.then((data) => setUsers(data))
65-
.catch((err) => setError(err));
66-
}, []);
67-
68-
69-
#2. Smooth Scrolling (react-scroll)
70-
Navigation links scroll to sections smoothly
71-
72-
jsx
73-
<Link to="findhelper-section" smooth={true} duration={500}>
74-
Find Helper
75-
</Link>
76-
77-
78-
#3. Routing (React Router)
79-
Handles /, /login, /signup routes
80-
81-
jsx
82-
const router = createBrowserRouter([
83-
{ path: "/", element: <Home /> },
84-
{ path: "/login", element: <LoginPage /> },
85-
{ path: "/signup", element: <SignupPage /> }
86-
]);
87-
88-
89-
#🔗 Dependencies
90-
Package Usage
91-
react Core library
92-
react-router-dom Routing
93-
react-scroll Smooth scrolling
94-
tailwindcss Styling
95-
vite Build tool
96-
📝 How to Contribute
97-
Fork the repository
98-
99-
Create a new branch (git checkout -b feature/new-feature)
100-
101-
Commit changes (git commit -m "Add new feature")
102-
103-
Push to the branch (git push origin feature/new-feature)
104-
105-
Open a Pull Request
106-
107-
#📜 License
108-
MIT License - Free to use and modify.
109-
110-
📬 Contact
111-
Mayank Banga- mayankbanga84@gmail.com
112-
113-
114-

src/App.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import SignUp from './components/signup/SignUp';
99
import Home from './components/home/Home';
1010
import LoginNav from "./components/loginnav/LoginNav";
1111
import NotFound from "./components/notfound/NotFound";
12+
import UserDashboard from "./components/userdashboard/UserDashboard";
1213

1314
const App = () => {
1415

@@ -39,6 +40,9 @@ const App = () => {
3940
<Home />
4041
</div>
4142
</>},
43+
{
44+
path:'/dashboard/:id',element:<UserDashboard />
45+
},
4246
{
4347
path:'*', element:
4448
<NotFound />
672 KB
Binary file not shown.
517 KB
Binary file not shown.

src/components/root/Root.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import Navigation from '../navigation/Navigation';
33
import LandingPage from '../landingPage/LandingPage';
44
import FindHelper from '../findHelper/FindHelper';
55
import Footer from '../footer/Footer';
6+
// import UserDashboard from '../userdashboard/UserDashboard';
7+
68

79
function Root() {
810
const [users, setUsers] = useState([]);
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import React from 'react'
2+
import UserProfile from './UserProfile/UserProfile'
3+
import { NavLink } from 'react-router-dom'
4+
import { ScrollArea } from '../ui/scroll-area'
5+
6+
7+
function UserDashboard() {
8+
return (
9+
<div className='w-screen h-screen bg-black flex font-mont'>
10+
{/* sidebar */}
11+
<div className='h-full w-1/6 grid gap-2 text-gray-500 bg-inherit justify-items-center '>
12+
<div className='place-self-center justify-self-center row-span-5 '>
13+
<div className=' aspect-square w-3/4 rounded-full overflow-hidden justify-items-center place-self-center shadow-md ring-2 ring-offset-white '>
14+
<img alt='profile' className='w-full h-auto '
15+
src='https://images.unsplash.com/photo-1676477208892-3a59818985bd?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8cG90cmFpdHxlbnwwfHwwfHx8MA%3D%3D'></img>
16+
</div>
17+
<div className='justify-self-center mt-2 '>
18+
<h1 className='text-2xl text-white font-bold'>Samantha</h1>
19+
<h2 className='text-md '>samantha@gmail.com</h2>
20+
</div>
21+
</div>
22+
23+
<div className='row-span-6'>
24+
<ul className='grid grid-rows-1 gap-3 font-bold tracking-wider'>
25+
<NavLink to='/dashboard/profile' className={({isActive}) => {
26+
return isActive? 'text-white bg-white/20 rounded-full p-3 w-full':' w-full p-3 hover:bg-white/20 hover:text-white hover:rounded-full hover:duration-200 hover:animate-in '
27+
}}><li>Profile</li></NavLink>
28+
<NavLink to='/dashboard/bookings' className={({isActive}) => {
29+
return isActive? 'text-white bg-white/20 rounded-full p-3 w-full':' w-full p-3 hover:bg-white/20 hover:text-white hover:rounded-full hover:duration-200 hover:animate-in '
30+
}}><li>Bookings</li></NavLink>
31+
<NavLink to='/dashboard/history' className={({isActive}) => {
32+
return isActive? 'text-white bg-white/20 rounded-full p-3 w-full':' w-full p-3 hover:bg-white/20 hover:text-white hover:rounded-full hover:duration-200 hover:animate-in '
33+
}}><li> History</li></NavLink>
34+
<NavLink to='/dashboard/payments' className={({isActive}) => {
35+
return isActive? 'text-white bg-white/20 rounded-full p-3 w-full':' w-full p-3 hover:bg-white/20 hover:text-white hover:rounded-full hover:duration-200 hover:animate-in '
36+
}}><li>Payments</li></NavLink>
37+
<NavLink to='/dashboard/others' className={({isActive}) => {
38+
return isActive? 'text-white bg-white/20 rounded-full p-3 w-full':' w-full p-3 hover:bg-white/20 hover:text-white hover:rounded-full hover:duration-200 hover:animate-in '
39+
}}><li>Other</li></NavLink>
40+
</ul>
41+
</div>
42+
</div>
43+
{/*sidebar*/}
44+
45+
{/* dashboard panel */}
46+
<div className=' w-full h-screen flex place-items-center'>
47+
<ScrollArea className='h-9/10 w-full rounded-lg m-8 bg-white/90'>
48+
<UserProfile />
49+
</ScrollArea>
50+
</div>
51+
{/* dashboard panel */}
52+
</div>
53+
)
54+
}
55+
56+
export default UserDashboard

0 commit comments

Comments
 (0)