Skip to content

Commit

Permalink
Merge pull request #953 from SE-TINF22B6/search_and_user_page
Browse files Browse the repository at this point in the history
Fix sharing from posts on userpage
  • Loading branch information
Nahlam4 committed Jun 13, 2024
2 parents ce7b12c + 2d863e0 commit 3c6a29e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/web/src/scenes/User/UserPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const UserPost: React.FC<PostModel> = (props: PostModel) => {
const [comments] = useState(commentAmount);
const [menuOpen, setMenuOpen] = useState(false);
const [shareWindowOpen, setShareWindowOpen] = useState(false);
const currentPageURL: string = window.location.href;
const location = useLocation();
const [shortDescription, setShortDescription] = useState('');
const searchParams: URLSearchParams = new URLSearchParams(window.location.search);
Expand Down Expand Up @@ -247,7 +246,7 @@ export const UserPost: React.FC<PostModel> = (props: PostModel) => {
)}
{shareWindowOpen && (
<div className="post-share-container">
<Share postId={id} currentPageURL={currentPageURL}></Share>
<Share postId={id} currentPageURL={process.env.PUBLIC_URL +"/post/?id="+id}></Share>
</div>
)}
{reportOpen && (
Expand Down

0 comments on commit 3c6a29e

Please sign in to comment.