perf: remove loading page temporarily due to perf issues

This commit is contained in:
2026-02-02 17:31:19 +00:00
parent 5ac4264470
commit 07ab818d95

View File

@@ -29,7 +29,7 @@ const styles = StatsStyling;
const StatPage = () => { const StatPage = () => {
const [error, setError] = useState(''); const [error, setError] = useState('');
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(false);
const [postsPerDay, setPostsPerDay] = useState([]); const [postsPerDay, setPostsPerDay] = useState([]);
const [heatmapData, setHeatmapData] = useState([]); const [heatmapData, setHeatmapData] = useState([]);
@@ -40,7 +40,7 @@ const StatPage = () => {
const getStats = () => { const getStats = () => {
setError(""); setError("");
setLoading(true); //setLoading(true);
Promise.all([ Promise.all([
axios.get("http://localhost:5000/stats/time"), axios.get("http://localhost:5000/stats/time"),
@@ -71,9 +71,7 @@ const StatPage = () => {
); );
setTopUserData(topUsers); setTopUserData(topUsers);
setHeatmapData(weekdayHourHeatmap); setHeatmapData(weekdayHourHeatmap);
setWordFrequencyData( setWordFrequencyData(
wordFrequencies.map((d: BackendWord) => ({ wordFrequencies.map((d: BackendWord) => ({
text: d.word, text: d.word,
@@ -83,7 +81,7 @@ const StatPage = () => {
}) })
.catch((e) => setError("Failed to load statistics: " + String(e))) .catch((e) => setError("Failed to load statistics: " + String(e)))
.finally(() => setLoading(false)); //.finally(() => setLoading(false));
}; };
const onSearch = () => { const onSearch = () => {