diff --git a/FU.SPA/src/components/Navbar.css b/FU.SPA/src/components/Navbar.css
index 342bf7b0..0d90a620 100644
--- a/FU.SPA/src/components/Navbar.css
+++ b/FU.SPA/src/components/Navbar.css
@@ -24,7 +24,7 @@ body {
.left-content,
.right-content {
- display:flex;
+ display: flex;
}
.site-title {
@@ -42,17 +42,17 @@ body {
}
.nav button {
-color: white;
-background: none;
-border: none;
-outline: none;
-font-family: inherit;
-font-size: inherit;
-cursor: pointer;
-display: flex;
-align-items: center;
-padding: 0.2rem;
-height: 100%;
+ color: white;
+ background: none;
+ border: none;
+ outline: none;
+ font-family: inherit;
+ font-size: inherit;
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ padding: 0.2rem;
+ height: 100%;
}
.nav a {
@@ -60,9 +60,8 @@ height: 100%;
text-decoration: none;
height: 100%;
display: flex;
- align-items:center;
+ align-items: center;
padding: 0.2rem;
-
}
.nav li.active {
diff --git a/FU.SPA/src/components/Navbar.jsx b/FU.SPA/src/components/Navbar.jsx
index 827391d4..1ca084cb 100644
--- a/FU.SPA/src/components/Navbar.jsx
+++ b/FU.SPA/src/components/Navbar.jsx
@@ -11,18 +11,25 @@ export default function Navbar() {
const renderTabContent = () => {
if (user) {
// if user has a custom pfp then use that, if not then use MUI instead of default pfp
- const defaultPFP = user.pfpUrl.includes('https://tr.rbxcdn.com/38c6edcb50633730ff4cf39ac8859840/420/420/Hat/Png');
- const pfpComponent = !defaultPFP
- ?
- : ;
+ const defaultPFP = user.pfpUrl.includes(
+ 'https://tr.rbxcdn.com/38c6edcb50633730ff4cf39ac8859840/420/420/Hat/Png',
+ );
+ const pfpComponent = !defaultPFP ? (
+
+ ) : (
+
+ );
return (
<>
-
- {pfpComponent}
-
-
-
-
+
+ {pfpComponent}
+
+
+
+
>
);
} else {
@@ -98,4 +105,4 @@ function stringAvatar(name) {
},
children: initials,
};
-}
\ No newline at end of file
+}
diff --git a/FU.SPA/src/components/pages/UserProfile.css b/FU.SPA/src/components/pages/UserProfile.css
index 8e5f50a9..34035d4e 100644
--- a/FU.SPA/src/components/pages/UserProfile.css
+++ b/FU.SPA/src/components/pages/UserProfile.css
@@ -44,7 +44,7 @@
button {
width: 233px;
- background-color: #E340DCDC;
+ background-color: #e340dcdc;
color: #fff;
padding: 15px;
border: none;
@@ -53,7 +53,7 @@
}
button:hover {
- background-color: #E340DC;
+ background-color: #e340dc;
}
}
}
diff --git a/FU.SPA/src/components/pages/UserProfile.jsx b/FU.SPA/src/components/pages/UserProfile.jsx
index 5f1cbedd..83e5205f 100644
--- a/FU.SPA/src/components/pages/UserProfile.jsx
+++ b/FU.SPA/src/components/pages/UserProfile.jsx
@@ -18,7 +18,11 @@ export default function UserProfile() {
try {
const profile = await UserService.getUserprofile(username);
setUserProfile(profile);
- setDefaultPFP(profile.pfpUrl.includes('https://tr.rbxcdn.com/38c6edcb50633730ff4cf39ac8859840/420/420/Hat/Png'));
+ setDefaultPFP(
+ profile.pfpUrl.includes(
+ 'https://tr.rbxcdn.com/38c6edcb50633730ff4cf39ac8859840/420/420/Hat/Png',
+ ),
+ );
} catch (error) {
console.error('Error fetching profile:', error);
}
@@ -32,7 +36,7 @@ export default function UserProfile() {
const dob = new Date(userProfile?.dob);
const today = new Date();
const age = Math.floor(
- (today.getTime() - dob.getTime()) / (1000 * 3600 * 24 * 365)
+ (today.getTime() - dob.getTime()) / (1000 * 3600 * 24 * 365),
);
const stringToColor = (string) => {
@@ -47,7 +51,7 @@ export default function UserProfile() {
color += `00${value.toString(16)}`.slice(-2);
}
return color;
- }
+ };
const initials = (name) => {
// split name by spaces and filter empty entries
@@ -58,16 +62,13 @@ export default function UserProfile() {
if (nameParts.length > 1) {
initials += nameParts[1][0];
}
-
+
return initials;
- }
+ };
const renderPfp = () => {
return !defaultPFP ? (
-
+
) : (
);
- }
+ };
const renderBio = () => {
if (!userProfile.bio) {
@@ -103,10 +104,12 @@ export default function UserProfile() {
if (!user || user.username === userProfile.username) {
return;
}
-
+
return (
-
+
);
@@ -115,29 +118,25 @@ export default function UserProfile() {
const clickSendMessage = async () => {
const chat = await getDirectChat(userProfile.id);
navigate(`/chat/${chat.id}`);
- }
+ };
if (userProfile) {
return (
<>
-
+
{renderPfp()}
{userProfile.username}
{userProfile.dob &&
Age: {age} years old
}
-
- {renderHeaderButtons()}
-
-
-
- {renderBio()}
+
{renderHeaderButtons()}
+
{renderBio()}
>
);
} else {
return
;
}
-}
\ No newline at end of file
+}
diff --git a/FU.SPA/src/main.jsx b/FU.SPA/src/main.jsx
index be74370c..5574a6d7 100644
--- a/FU.SPA/src/main.jsx
+++ b/FU.SPA/src/main.jsx
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.jsx';
-import './index.css'
+import './index.css';
// add comment
import './components/Navbar.css';
import { BrowserRouter } from 'react-router-dom';