From d34907681aa50e50735071dd5329d09a29da56fb Mon Sep 17 00:00:00 2001 From: Marshall Polaris Date: Mon, 9 May 2022 15:50:20 -0700 Subject: [PATCH] Remove some random unnecessary wrapper divs (#163) * Remove wrapper div in user comment feed item * Remove wrapper div around feed market card title link * Remove wrapper div around BetRow --- web/components/bet-row.tsx | 83 ++++++++++++++-------------- web/components/feed/feed-items.tsx | 86 ++++++++++++++---------------- 2 files changed, 82 insertions(+), 87 deletions(-) diff --git a/web/components/bet-row.tsx b/web/components/bet-row.tsx index 969dc47f..b53a57fd 100644 --- a/web/components/bet-row.tsx +++ b/web/components/bet-row.tsx @@ -1,4 +1,5 @@ import { useState } from 'react' +import clsx from 'clsx' import { BetPanelSwitcher } from './bet-panel' import { Row } from './layout/row' @@ -30,48 +31,46 @@ export default function BetRow(props: { return ( <> -
- - {/*
- Place a trade -
*/} - { - setOpen(true) - setBetChoice(choice) - }} - replaceNoButton={ - yesFloorShares > 0 ? ( - - ) : undefined - } - replaceYesButton={ - noFloorShares > 0 ? ( - - ) : undefined - } - /> -
- - setOpen(false)} - /> - -
+ + {/*
+ Place a trade +
*/} + { + setOpen(true) + setBetChoice(choice) + }} + replaceNoButton={ + yesFloorShares > 0 ? ( + + ) : undefined + } + replaceYesButton={ + noFloorShares > 0 ? ( + + ) : undefined + } + /> +
+ + setOpen(false)} + /> + ) } diff --git a/web/components/feed/feed-items.tsx b/web/components/feed/feed-items.tsx index 37633643..e2df8f48 100644 --- a/web/components/feed/feed-items.tsx +++ b/web/components/feed/feed-items.tsx @@ -166,43 +166,41 @@ export function FeedComment(props: { avatarUrl={userAvatarUrl} />
-
-

- {' '} - {!matchedBet && userPosition > 0 && ( +

+ {' '} + {!matchedBet && userPosition > 0 && ( + <> + {'had ' + userPositionMoney + ' '} <> - {'had ' + userPositionMoney + ' '} - <> - {' of '} - noFloorShares ? 'YES' : 'NO'} - contract={contract} - truncate="short" - /> - + {' of '} + noFloorShares ? 'YES' : 'NO'} + contract={contract} + truncate="short" + /> + + + )} + <> + {bought} {money} + {outcome && !hideOutcome && ( + <> + {' '} + of{' '} + )} - <> - {bought} {money} - {outcome && !hideOutcome && ( - <> - {' '} - of{' '} - - - )} - - -

-
+ + +

- - trackClick(contract.id)} - className="text-lg text-indigo-700 sm:text-xl" - > - {question} - - + trackClick(contract.id)} + className="text-lg text-indigo-700 sm:text-xl" + > + {question} + {isBinary && (