refactor: improve api calling and var storage in Stat Page

This commit is contained in:
2026-02-03 11:36:43 +00:00
parent 815aaf3481
commit 2af31d3392
2 changed files with 38 additions and 49 deletions

View File

@@ -1,10 +1,15 @@
// User Code
// User Responses
type TopUser = {
author: string;
source: string;
count: number
};
type FrequencyWord = {
word: string;
count: number;
}
type Vocab = {
author: string;
events: number;
@@ -12,7 +17,7 @@ type Vocab = {
unique_words: number;
vocab_richness: number;
avg_words_per_event: number;
top_words: { word: string; count: number }[];
top_words: FrequencyWord[];
};
type User = {
@@ -48,11 +53,6 @@ type TimeAnalysisResponse = {
}
// Content Analysis
type FrequencyWord = {
word: string;
count: number;
}
type ContentAnalysisResponse = {
word_frequencies: FrequencyWord[];
}