Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
share bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
2deadmen committed Jul 6, 2023
1 parent 898d5e3 commit f65f6c7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def handle_connect(data):
##
print("created")
room_id = result[0]

print(room_id)
# join_room(room_id)
socketio.emit("connection", {"data": room_id})

Expand Down
Binary file added backend/test.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/components/Navbars/Sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Sidebar = (props) => {
to="/nft"
icon="bi bi-currency-dollar"
label="My NFT's"
/> */}
/> */}
<SideBarOption
onClick={HandleLogout}
icon="bi bi-box-arrow-in-right"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/posts/Post.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Post = (props) => {
};

const handleshare = async (reciever_id, msg) => {
socket.emit("connectuser", { sender_id: user_id, reciever_id: 2 });
socket.emit("connectuser", { sender_id: user_id, reciever_id: reciever_id});
await socket.on("connection", (message) => {
setroomid(message["data"]);
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/posts/PostModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const PostModal = (props) => {
const [loadcomments, setloadcomments] = useState(false);
const [showOptions, setShowOptions] = useState(false);
let element = props.element;

console.log(element)
let openPost = props.openPost;
let handleClosePost = props.handleClosePost;
let commentRef = useRef();
Expand Down
15 changes: 8 additions & 7 deletions frontend/src/pages/ProfilePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ const ProfilePage = (props) => {
const getAllPosts = async () => {
const { data } = await getuserposts(id);

if (data.sucess == false) {
if (data.sucess === false) {
setposts([]);
}
setposts(data);


console.log(posts)
};

const getFollowing = async () => {
Expand Down Expand Up @@ -170,18 +171,18 @@ const ProfilePage = (props) => {
</div>
<div class="row">
{posts.length > 0 ? (
posts.map((post) => {
posts.map((postlist) => {
return (
<div class="col-lg-6 mb-2 pr-lg-1">
<div key={postlist[0]} class="col-lg-6 mb-2 pr-lg-1">
<img
src={post[0]}
src={postlist[0]}
alt="..."
class="img-fluid rounded shadow-sm h-64"
onClick={handleOpenPost}

/>
<PostModal
element={post}
element={postlist}
openPost={openPost}
handleClosePost={handleClosePost}
/>
Expand All @@ -191,7 +192,7 @@ const ProfilePage = (props) => {
) : (
<h3>Posts are empty</h3>
)}
</div>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit f65f6c7

Please sign in to comment.