diff --git a/backend/public/uploads/users/no-image.jpg b/backend/public/uploads/users/no-image.jpg
new file mode 100644
index 0000000..def330f
Binary files /dev/null and b/backend/public/uploads/users/no-image.jpg differ
diff --git a/frontend/src/Screens/Authentication/Register.jsx b/frontend/src/Screens/Authentication/Register.jsx
index 0526ed8..a02f3f9 100644
--- a/frontend/src/Screens/Authentication/Register.jsx
+++ b/frontend/src/Screens/Authentication/Register.jsx
@@ -13,8 +13,7 @@ export const Register = () => {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [passwordValid, setPasswordValid] = useState(false);
- const [showPasswordRequirements, setShowPasswordRequirements] =
- useState(false);
+ const [passwordInputFocused, setPasswordInputFocused] = useState(false);
const [latitude, setLatitude] = useState("");
const [longitude, setLongitude] = useState("");
const [city, setCity] = useState("");
@@ -32,12 +31,12 @@ export const Register = () => {
const passwordValue = e.target.value;
setPassword(passwordValue);
setPasswordValid(passwordRegex.test(passwordValue));
- };
- const showPasswordRequirementsPopup = () => {
- setShowPasswordRequirements(true);
- setTimeout(() => {
- setShowPasswordRequirements(false);
- }, 3000);
+
+ if (e.type === "focus") {
+ setPasswordInputFocused(true);
+ } else if (e.type === "blur") {
+ setPasswordInputFocused(false);
+ }
};
const { coords, isGeolocationAvailable, isGeolocationEnabled } =
useGeolocated({
@@ -278,23 +277,23 @@ export const Register = () => {
id="password"
value={password}
onChange={handlePasswordChange}
- onFocus={showPasswordRequirementsPopup}
+ onFocus={(e) => handlePasswordChange(e)}
+ onBlur={(e) => handlePasswordChange(e)}
className={`textfield ${
- passwordValid
- ? "border-solid border-2 border-green-600"
- : "border-solid border-2 border-red-600"
- }`}
+ password.length !==0 &&
+ (passwordValid
+ ? "border-solid border-2 border-green-600"
+ : "border-solid border-2 border-red-600")
+ }`}
placeholder="Your password here ..."
required
/>
-
- At least 8 characters, one uppercase letter, one lowercase
- letter, one digit, and one special character
-
+ {passwordInputFocused && (
+
+ At least 8 characters, one uppercase letter, one lowercase
+ letter, one digit, and one special character
+
+ )}
{/* list of locality */}
{/* {addressList &&
diff --git a/frontend/src/Screens/OtherProfile.jsx b/frontend/src/Screens/OtherProfile.jsx
index c1fa23d..6888613 100644
--- a/frontend/src/Screens/OtherProfile.jsx
+++ b/frontend/src/Screens/OtherProfile.jsx
@@ -55,7 +55,7 @@ function OtherProfile() {
src={
otherProfile.avatar
? `http://localhost:8080/users-images/${otherProfile.avatar}`
- : "https://source.unsplash.com/random"
+ : "http://localhost:8080/users-images/no-image.jpg"
}
alt={otherProfile.name}
className="h-full w-full object-cover"
@@ -111,22 +111,22 @@ export default OtherProfile;
function PostCard({ postData }) {
return (
-
-

-
+ {postData.image !== "" ? (
+
+

+
+ ) : (
+ <>>
+ )}
{postData.title}
-
{postData.content}
+
{postData.content}
);
diff --git a/frontend/src/components/CommentTile.jsx b/frontend/src/components/CommentTile.jsx
index f30ddc1..5dc64b1 100644
--- a/frontend/src/components/CommentTile.jsx
+++ b/frontend/src/components/CommentTile.jsx
@@ -3,7 +3,7 @@ import { SendIcon } from "./Icons";
import axios from "axios";
import { Context } from "../context/ContextProvider";
-function CommentTile({ commentData, replies, userID, postID }) {
+function CommentTile({ commentData, replies, userID, postID,setComments }) {
const [newReply, setNewReply] = useState("");
const [likeComment, setLikeComment] = useState(false);
const [incomingReplies, setIncomingReplies] = useState(replies);
diff --git a/frontend/src/components/Navbar.jsx b/frontend/src/components/Navbar.jsx
index 3ae2023..0b5cdc7 100644
--- a/frontend/src/components/Navbar.jsx
+++ b/frontend/src/components/Navbar.jsx
@@ -44,6 +44,7 @@ export default function Navbar() {
My Profile
+
About Us
diff --git a/frontend/src/components/PostComponent.jsx b/frontend/src/components/PostComponent.jsx
index f245452..2207f61 100644
--- a/frontend/src/components/PostComponent.jsx
+++ b/frontend/src/components/PostComponent.jsx
@@ -143,7 +143,7 @@ export const PostComponent = ({
showPostMenu ? "opacity-100" : "opacity-0 pointer-events-none"
} absolute shadow-lg py-2 bg-white rounded-lg w-[100px] transition-opacity duration-300 right-1`}
>
-
+ */}