diff --git a/src/components/bidpage/BidForm.js b/src/components/bidpage/BidForm.js
index 2b1c66f..e4f8c55 100644
--- a/src/components/bidpage/BidForm.js
+++ b/src/components/bidpage/BidForm.js
@@ -45,7 +45,7 @@ const PlaceBidButton = styled(Button)`
}
`;
-const BidForm = () => {
+const BidForm = ({ props }) => {
const { t } = useTranslation();
const { yobot, isAuthed, balance, address, refreshEvents } = useYobot();
const [validParams, setValidParams] = useState(false);
@@ -284,11 +284,19 @@ const BidForm = () => {
) : (
""
)}
+ {isAuthed && props.alreadyPlacedBid ? (
+
+ You've already placed a bid on this project.
+
+ ) : (
+ ""
+ )}
{!isAuthed ? (
) : (
{
const [totalBids, setTotalBids] = useState("-");
const [highestBidInWei, setHighestBidInWei] = useState("-");
const [gettingActions, setGettingActions] = useState(true);
+ const [alreadyPlacedBid, setAlreadyPlacedBid] = useState(false);
const fetchUserOrdersAndTotalStats = async () => {
let _placed_orders = [];
@@ -48,9 +49,6 @@ const BidPageMain = ({ projectId }) => {
let _token_address = values["1"];
let _action_taken = values["4"];
- // orders[msg.sender][_tokenAddress];
- // for all orders for this token address, add qty
-
// TODO: implement orderID so easier to lookup orders to update order status & get stats... Otherwise need to loop thru all txs
// For this NFT contract,
@@ -107,6 +105,8 @@ const BidPageMain = ({ projectId }) => {
_cancelled_orders.reverse()
);
+ setAlreadyPlacedBid(_placed_orders.length > 0);
+
const highestBidInWei = Math.max(
highestFilledBidInWei,
Math.max(...Object.values(placedBidValuesForProject))
@@ -168,7 +168,7 @@ const BidPageMain = ({ projectId }) => {