aboutsummaryrefslogtreecommitdiff
path: root/client/src/MarketDataPage.jsx
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2025-04-27 22:36:35 -0600
committerNavan Chauhan <navanchauhan@gmail.com>2025-04-27 22:36:35 -0600
commit7d5cf0adc6e600e976e8633a91f01b4673c8584d (patch)
tree7660fee6cde49b76d59aba74330881804faef916 /client/src/MarketDataPage.jsx
parente71e35b275efbf83acd0ab7278233adde81a175e (diff)
make responsive on mobile
Diffstat (limited to 'client/src/MarketDataPage.jsx')
-rw-r--r--client/src/MarketDataPage.jsx39
1 files changed, 36 insertions, 3 deletions
diff --git a/client/src/MarketDataPage.jsx b/client/src/MarketDataPage.jsx
index f874baa..5e028f8 100644
--- a/client/src/MarketDataPage.jsx
+++ b/client/src/MarketDataPage.jsx
@@ -49,7 +49,7 @@ function MarketDataPage() {
const [loading, setLoading] = useState(true);
const [fiveMinLastUpdated, setFiveMinLastUpdated] = useState(null);
const [dayAheadLastUpdated, setDayAheadLastUpdated] = useState(null);
- const [_, setNow] = useState(new Date());
+ const [, setNow] = useState(new Date());
const handleZoomChange = (e, title) => {
if (!e?.start || !e?.end) return;
@@ -192,8 +192,8 @@ function MarketDataPage() {
const dayAheadKPIs = computeKPIs(dayAheadData);
return (
- <div style={{ padding: 20, background: 'var(--color-fill-2)', animation: 'fadeIn 0.5s ease' }}>
- <Typography.Title heading={3} style={{ textAlign: 'center', marginBottom: 20 }}>
+ <div className="page-container">
+ <Typography.Title heading={3} style={{ textAlign: 'center', marginBottom: 20 }} className="market-page-title" >
Market Data for {MARKET_FULL_NAMES[selectedMarket]}
</Typography.Title>
@@ -279,6 +279,39 @@ function MarketDataPage() {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
+
+ .arco-card-header-title {
+ white-space: normal !important; /* allow wrapping */
+ word-break: break-word;
+ }
+
+ /* Optional: smaller text on tiny devices */
+ @media (max-width: 768px) {
+ .arco-card-header-title {
+ font-size: 14px;
+ }
+ }
+
+ .market-page-title {
+ white-space: normal;
+ word-break: keep-all;
+ overflow-wrap: break-word;
+ text-align: center;
+ }
+
+ .page-container {
+ padding: 15px;
+ background: var(--color-fill-2);
+ animation: fadeIn 0.5s ease;
+ overflow-x: hidden; /* Also good practice */
+ }
+
+ /* Responsive: remove padding on small screens */
+ @media (max-width: 768px) {
+ .page-container {
+ padding: 0;
+ }
+ }
`}</style>
</div>
);