From 5244aff586df93de2b9973de9c9046e4ad6163bd Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sun, 27 Apr 2025 21:30:56 -0600 Subject: improve styling --- client/src/SubmitBidPage.jsx | 76 ++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 23 deletions(-) (limited to 'client/src/SubmitBidPage.jsx') diff --git a/client/src/SubmitBidPage.jsx b/client/src/SubmitBidPage.jsx index 94a0c32..7737c20 100644 --- a/client/src/SubmitBidPage.jsx +++ b/client/src/SubmitBidPage.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useContext } from 'react'; -import { Form, InputNumber, DatePicker, Button, Message, Typography, Card, Select } from '@arco-design/web-react'; +import { Form, InputNumber, DatePicker, Button, Message, Typography, Card } from '@arco-design/web-react'; import '@arco-design/web-react/dist/css/arco.css'; import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; @@ -27,18 +27,15 @@ function SubmitBidPage() { const updateTime = () => { const now = dayjs(); const localFormatted = now.format('dddd, MMMM D, h:mm A'); - const marketTz = MARKET_TIMEZONES[selectedMarket] || 'America/New_York'; const marketTime = now.tz(marketTz); const marketFormatted = marketTime.format('dddd, MMMM D, h:mm A'); - setLocalNow(localFormatted); setMarketNow(marketFormatted); }; updateTime(); const interval = setInterval(updateTime, 1000); - return () => clearInterval(interval); }, [selectedMarket]); @@ -56,14 +53,12 @@ function SubmitBidPage() { quantity: values.quantity, price: values.price, market: selectedMarket, - user_id: 1 // Hardcoded user id for now + user_id: 1 }; const res = await fetch(`${API_BASE_URL}/bids/`, { method: 'POST', - headers: { - 'Content-Type': 'application/json' - }, + headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }); @@ -83,24 +78,37 @@ function SubmitBidPage() { }; return ( -
- Submit New Bid - - - Current Local Time: {localNow} - - - Current {MARKET_FULL_NAMES[selectedMarket]} Time: {marketNow} - +
+ + Submit New Bid + + + +
+ + Current Local Time: {localNow} + + + Current {MARKET_FULL_NAMES[selectedMarket]} Time: {marketNow} + +
Array.from({ length: 60 }, (_, i) => i !== 0)} timezone={MARKET_TIMEZONES[selectedMarket]} /> @@ -145,12 +152,35 @@ function SubmitBidPage() { -
+ +
); } -- cgit v1.2.3