nice-bill commited on
Commit
dd6dd29
·
1 Parent(s): d6f2ed2

animation improved

Browse files
Files changed (1) hide show
  1. frontend/src/App.jsx +28 -4
frontend/src/App.jsx CHANGED
@@ -8,6 +8,33 @@ import Logo from './assets/logo.svg';
8
 
9
  const API_BASE = import.meta.env.VITE_API_URL || "http://localhost:8000";
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  function App() {
12
  const [wallet, setWallet] = useState("");
13
  const [status, setStatus] = useState("idle");
@@ -140,10 +167,7 @@ function App() {
140
  <div className="h-1 bg-border overflow-hidden rounded-full">
141
  <div className="h-full bg-accent w-1/3 animate-[shimmer_1s_infinite_linear]"></div>
142
  </div>
143
- <div className="flex justify-between text-[10px] font-mono text-text-secondary uppercase">
144
- <span>Ingesting Data</span>
145
- <span className="animate-pulse">...</span>
146
- </div>
147
  </div>
148
  )}
149
 
 
8
 
9
  const API_BASE = import.meta.env.VITE_API_URL || "http://localhost:8000";
10
 
11
+ function StatusCycler() {
12
+ const [msgIndex, setMsgIndex] = useState(0);
13
+ const messages = [
14
+ "> INITIALIZING_NEURAL_UPLINK...",
15
+ "> ESTABLISHING_DUNE_CONNECTION...",
16
+ "> SCANNING_ETHEREUM_HISTORY...",
17
+ "> AGGREGATING_NFT_VECTORS...",
18
+ "> COMPUTING_CLUSTERING_TENSORS...",
19
+ "> DECODING_BEHAVIORAL_PATTERNS...",
20
+ "> FINALIZING_AI_ANALYSIS..."
21
+ ];
22
+
23
+ useEffect(() => {
24
+ const interval = setInterval(() => {
25
+ setMsgIndex((prev) => (prev + 1) % messages.length);
26
+ }, 3500);
27
+ return () => clearInterval(interval);
28
+ }, []);
29
+
30
+ return (
31
+ <div className="flex justify-between text-[10px] font-mono text-text-secondary uppercase tracking-widest">
32
+ <span className="animate-pulse">{messages[msgIndex]}</span>
33
+ <span className="animate-[blink_1s_infinite]">_</span>
34
+ </div>
35
+ );
36
+ }
37
+
38
  function App() {
39
  const [wallet, setWallet] = useState("");
40
  const [status, setStatus] = useState("idle");
 
167
  <div className="h-1 bg-border overflow-hidden rounded-full">
168
  <div className="h-full bg-accent w-1/3 animate-[shimmer_1s_infinite_linear]"></div>
169
  </div>
170
+ <StatusCycler />
 
 
 
171
  </div>
172
  )}
173