From 1ab64bac1c098c7aaf9ac074a06638e7f92c8b92 Mon Sep 17 00:00:00 2001
From: boilerrat <128boilerrat@gmail.com>
Date: Wed, 8 Jan 2025 22:43:50 -0500
Subject: [PATCH] export fix
---
src/components/ReactorStatus/index.tsx | 262 ++++++++++++-------------
1 file changed, 122 insertions(+), 140 deletions(-)
diff --git a/src/components/ReactorStatus/index.tsx b/src/components/ReactorStatus/index.tsx
index 5197cb2..ffa8ecb 100644
--- a/src/components/ReactorStatus/index.tsx
+++ b/src/components/ReactorStatus/index.tsx
@@ -5,7 +5,7 @@ import type { ReactorStatusProps, TooltipProps, PriceStat } from './types';
import { getEthereumData, formatPrice, getHighLowPrices, formatVolume } from '../../utils/api';
const statusMessages = [
- 'Staking valves open',
+ 'Mining blocks... literally',
'Consensus achieved',
'Smart contracts cooling',
'Tokens well-contained',
@@ -31,7 +31,7 @@ const CustomTooltip = ({ active, payload, label }: TooltipProps) => {
return null;
};
-const ReactorStatus = ({ className = '' }: ReactorStatusProps) => {
+export const ReactorStatus = ({ className = '' }: ReactorStatusProps) => {
const [power, setPower] = useState(0);
const [status, setStatus] = useState('Initializing...');
const [isAnimating, setIsAnimating] = useState(false);
@@ -112,157 +112,139 @@ const ReactorStatus = ({ className = '' }: ReactorStatusProps) => {
{ label: 'Rad Level', value: '0.12 μSv' }
];
- const renderPriceChart = () => {
- if (loading) {
- return (
-
-
-
-
Loading price data...
-
-
- );
- }
-
- if (error) {
- return (
-
- );
- }
-
- if (!priceData.length) {
- return (
-
-
No price data available
-
- );
- }
-
- return (
-
-
- new Date(timestamp).toLocaleTimeString()}
- />
- formatPrice(value)}
- />
- } />
-
-
-
- );
- };
-
return (
-
- {/* Reactor Status Panel */}
-
-
-
-
-
-
- {currentTime.toLocaleTimeString()}
-
-
-
-
-
- {/* Power Level */}
-
-
-
-
- {power.toFixed(1)}% Capacity
-
-
-
- {/* Status Message */}
-
-
- Current Status
-
-
-
- {status}
-
-
-
- {/* Activity Indicators */}
-
- {statusIndicators.map((item, index) => (
-
-
{item.label}
-
{item.value}
-
- ))}
-
-
-
-
- {/* ETH Price Monitor */}
-
-
-
+
+
+ {/* Reactor Status Panel */}
+
+
-
-
ETH Price Monitor
+
+
Reactor Status
-
-
Live Feed
+
+
+ {currentTime.toLocaleTimeString()}
+
- {priceData.length > 0 && (
+
+
+ {/* Power Level */}
-
Current Price
-
- {formatPrice(priceData[priceData.length - 1].price)}
+
+
+
+ {power.toFixed(1)}% Capacity
- )}
+
+ {/* Status Message */}
+
+
+ Current Status
+
+
+
+ {status}
+
+
+
+ {/* Activity Indicators */}
+
+ {statusIndicators.map((item, index) => (
+
+
{item.label}
+
{item.value}
+
+ ))}
+
+
-
- {/* Price Chart */}
-
- {renderPriceChart()}
+ {/* ETH Price Monitor */}
+
+
+
+
+
+
ETH Price Monitor
+
+
+
+ Live Feed
+
+
+ {priceData.length > 0 && (
+
+
Current Price
+
+ {formatPrice(priceData[priceData.length - 1].price)}
+
+
+ )}
- {/* Price Stats */}
-
- {priceStats.map((item, index) => (
-
-
{item.label}
-
{item.value}
-
- ))}
+
+ {/* Price Chart */}
+
+ {loading ? (
+
+
+
+
Loading price data...
+
+
+ ) : error ? (
+
+ ) : (
+
+
+ new Date(timestamp).toLocaleTimeString()}
+ />
+ formatPrice(value)}
+ />
+ } />
+
+
+
+ )}
+
+
+ {/* Price Stats */}
+
+ {priceStats.map((item, index) => (
+
+
{item.label}
+
{item.value}
+
+ ))}
+