Skip to content

Commit

Permalink
Current User ID
Browse files Browse the repository at this point in the history
  • Loading branch information
adammotts committed Apr 18, 2024
1 parent d4d8e93 commit c525492
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions frontend/pages/MakePost/PortfolioSummary/PortfolioSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/pages/MakePost/TextBasedPost/TextBasedPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const TextBasedPost: React.FC = () => {
return state.makePost;
});

const session = useSession();
const { session } = useSession();

const dispatch = useDispatch();

Expand All @@ -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(() => {
Expand Down
6 changes: 3 additions & 3 deletions frontend/pages/MakePost/TradePost/TradePostDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const TradePostDetails: React.FC = () => {
return state.makePost;
});

const session = useSession();
const { session } = useSession();

const dispatch = useDispatch();

Expand All @@ -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,
Expand Down

0 comments on commit c525492

Please sign in to comment.