Skip to content

Commit

Permalink
edit post bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandyrzph committed Aug 6, 2022
1 parent 8ca9839 commit 643c0f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pixelplace/src/components/Navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ const Navbar = () => {
<MdOutlineExplore size={"1.8rem"} />
</li>
</Link>
<Link className="" to="post-create">
<Link to="post-create">
<li className="hover:-translate-y-[1px] bg-white text-xl hover:shadow-[2px_2px_0px_black] duration-100 cursor-pointer rounded-md border-black border-2">
<AiOutlinePlus size={"1.8rem"} />
<AiOutlinePlus className="p-1" size={"1.8rem"} />
</li>
</Link>
<li className="relative z-[1000]">
Expand Down
6 changes: 5 additions & 1 deletion pixelplace/src/components/Posts/PostEditForm/PostEditForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const PostEditForm = () => {
};

const handleSubmit = async (values) => {
const url = await uploadImage(values.image);
let url = imageReceived;
if (values.image != imageReceived) {
url = await uploadImage(values.image);
}

try {
await updateDoc(doc(db, `Posts`, postId), {
...values,
Expand Down

0 comments on commit 643c0f6

Please sign in to comment.