diff --git a/frontend/pages/MakePost/PortfolioSummary/PortfolioSummary.tsx b/frontend/pages/MakePost/PortfolioSummary/PortfolioSummary.tsx index 8d1ec034..afdc96fd 100644 --- a/frontend/pages/MakePost/PortfolioSummary/PortfolioSummary.tsx +++ b/frontend/pages/MakePost/PortfolioSummary/PortfolioSummary.tsx @@ -26,12 +26,12 @@ const PortfolioSummary: React.FC = () => { const dispatch = useDispatch(); - const session = useSession(); + const { session } = useSession(); const createPost = async () => { await createPortfolioPost( - "user_2chL8dX6HdbBAuvu3DDM9f9NzKK", - //session.session?.id ?? '', + //"user_2chL8dX6HdbBAuvu3DDM9f9NzKK", + session?.user.id ?? '', makePost.percentData, // TODO: Fetch using financial API makePost.summaryType, // TODO: Fetch using financial API ).then(() => { diff --git a/frontend/pages/MakePost/TextBasedPost/TextBasedPost.tsx b/frontend/pages/MakePost/TextBasedPost/TextBasedPost.tsx index df77630f..3a801379 100644 --- a/frontend/pages/MakePost/TextBasedPost/TextBasedPost.tsx +++ b/frontend/pages/MakePost/TextBasedPost/TextBasedPost.tsx @@ -21,7 +21,7 @@ const TextBasedPost: React.FC = () => { return state.makePost; }); - const session = useSession(); + const { session } = useSession(); const dispatch = useDispatch(); @@ -33,8 +33,8 @@ const TextBasedPost: React.FC = () => { dispatch(updateDescription(description)); await createTextPost( - "user_2chL8dX6HdbBAuvu3DDM9f9NzKK", - //session.session?.id ?? '', + //"user_2chL8dX6HdbBAuvu3DDM9f9NzKK", + session?.user.id ?? '', title, description, ).then(() => { diff --git a/frontend/pages/MakePost/TradePost/TradePostDetails.tsx b/frontend/pages/MakePost/TradePost/TradePostDetails.tsx index 1536db10..ec56dd18 100644 --- a/frontend/pages/MakePost/TradePost/TradePostDetails.tsx +++ b/frontend/pages/MakePost/TradePost/TradePostDetails.tsx @@ -22,7 +22,7 @@ const TradePostDetails: React.FC = () => { return state.makePost; }); - const session = useSession(); + const { session } = useSession(); const dispatch = useDispatch(); @@ -34,8 +34,8 @@ const TradePostDetails: React.FC = () => { dispatch(updateDescription(description)); await createTradePost( - "user_2chL8dX6HdbBAuvu3DDM9f9NzKK", - //session.session?.id ?? '', + //"user_2chL8dX6HdbBAuvu3DDM9f9NzKK", + session?.user.id ?? '', makePost.percentData, // TODO: Fetch using financial API makePost.tickerSymbol, // TODO: Fetch using financial API title,