refactor: streamline CorpusExplorer components

This commit is contained in:
2026-04-13 17:06:46 +01:00
parent bc356848ef
commit c11434344a
6 changed files with 147 additions and 202 deletions

View File

@@ -26,12 +26,12 @@ import {
buildDateBucketSpec,
buildOneTimeUsersSpec,
buildUserSpec,
getExplorerButtonStyle,
type CorpusExplorerSpec,
} from "../utils/corpusExplorer";
const styles = StatsStyling;
const MAX_WORDCLOUD_WORDS = 250;
const exploreButtonStyle = { padding: "4px 8px", fontSize: 12 };
const WORDCLOUD_OPTIONS = {
rotations: 2,
@@ -80,7 +80,7 @@ function convertFrequencyData(data: FrequencyWord[]) {
const renderExploreButton = (onClick: () => void) => (
<button
onClick={onClick}
style={{ ...styles.buttonSecondary, ...getExplorerButtonStyle() }}
style={{ ...styles.buttonSecondary, ...exploreButtonStyle }}
>
Explore
</button>