Skip to content

Commit

Permalink
creating Profile
Browse files Browse the repository at this point in the history
  • Loading branch information
sonuku092 committed Feb 27, 2024
1 parent 93070fb commit fe0501a
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Login from './components/Login/Login';
import Signup from './components/Signup/Signup';
import Chats from './components/Chats/Chats';
import Protected from './components/Protected';
import Profile from './components/Profile/Profile';

function App() {

Expand All @@ -16,6 +17,7 @@ function App() {
<Route path="/login" element={<Login/>} />
<Route path="/signup" element={<Signup />} />
<Route path="/" element={<Protected Component={ Chats }/>} />
<Route path="/Profile" element={<Protected Component={ Profile }/>} />
<Route path="/home" element={<Home/>} />
</Routes>
</Router>
Expand Down
57 changes: 57 additions & 0 deletions frontend/src/components/Profile/Profile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React from 'react'
import styles from './Profile.module.css'

function Profile() {
return (
<div className={styles.container}>
<div className={styles.profile}>
<div className={styles.profileImage}>
<img src="https://via.placeholder.com/150" alt="Profile" />

<button className={styles.uploadBtn}>
<i className="fas fa-camera"></i>
</button>
</div>
<div className={styles.profileDetails}>
<h1>John Doe</h1>
<p>
<strong>Email:</strong>
<span>
sonukumar@gmail.com
</span>
</p>
<p>
<strong>Phone:</strong>
<span>

</span>
</p>

<p>
<strong>Address:</strong>
<span>
Darbhanga, Bihar - 846004
</span>
</p>

<p>
<strong>City:</strong>
<span>

</span>
</p>

<p>

<strong>State:</strong>
<span>

</span>
</p>
</div>
</div>
</div>
)
}

export default Profile
40 changes: 40 additions & 0 deletions frontend/src/components/Profile/Profile.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.container {
display: flex;
flex-direction: column;
align-items: center;
height: 100vh;
width: 100%;
padding: 20px;
background-color: rgb(243, 248, 248);
}

.profile {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
padding: 20px;
background-color: white;
border-radius: 10px;
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
}

.profileImage {
width: 150px;
height: 150px;
border-radius: 50%;
margin-bottom: 20px;
}

.profileImage img {
width: 100%;
height: 100%;
border-radius: 50%;
}

.profileDetails {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 20px;
}

0 comments on commit fe0501a

Please sign in to comment.