Skip to content

Commit 5683c57

Browse files
authored
Merge pull request #1468 from Ayushmaanagarwal1211/Auth1
Fixed Placeholder and blog bug
2 parents c278b33 + 306d841 commit 5683c57

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

website3.0/components/blogpage/BlogPost.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ function BlogPost() {
229229
setReply(arr)
230230
setComments(data.comments || []);
231231
updateTotalReactionCount(data.reactionList);
232-
let userid=JSON.parse(localStorage.getItem('finalUser'))._id
232+
let userid=JSON.parse(localStorage.getItem('finalUser'))?._id || ""
233233
data.comments.map((res)=>{
234234
let ans=false
235235
res.likeusers.map(r=>{
@@ -892,7 +892,7 @@ return formattedDate
892892
let [modalIndex,setModalIndex]=useState(false)
893893
function handleError(){
894894

895-
document.getElementById("image-section").src='https://via.placeholder.com/600x400.png?text=No+Image+Available'
895+
document.getElementById("image-section").src='https://dummyimage.com/600x300'
896896
}
897897
return (
898898
<>

website3.0/pages/AdminPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const AdminPanel = ({authKey}) => {
164164
className="w-10 h-10 rounded-full ml-4"
165165
/> */}
166166
<Image
167-
src="https://via.placeholder.com/40" // URL to your image
167+
src="https://dummyimage.com/600x300" // URL to your image
168168
alt="Admin Profile"
169169
layout="fill" // Fills the container
170170
objectFit="cover" // Ensures the image covers the container while preserving aspect ratio

website3.0/pages/BlogPage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ useEffect(()=>{
271271
const handleImageError = (e) => {
272272
const src = e.target.src;
273273
e.target.onerror = null;
274-
e.target.src = "https://via.placeholder.com/600x400.png?text=No+Image+Available"
274+
e.target.src = "https://dummyimage.com/600x300"
275275

276276
};
277277

0 commit comments

Comments
 (0)