fix: remove unexpected props

This commit is contained in:
Mahen 2026-02-11 07:41:14 +07:00
parent e5a3262091
commit dafd5ca196
3 changed files with 18 additions and 15 deletions

View File

@ -2,8 +2,11 @@
import { Header } from "./Header";
import {
Frown,
Meh,
MessageSquareText,
Minus,
Smile,
ThumbsDown,
ThumbsUp,
TrendingUp,
@ -13,15 +16,15 @@ import {
brandData,
sentimentDistribution,
trendData,
wordCloudData,
} from "@/src/app/dashboard/lib/data";
import { ModelInfoSkeleton } from "../skeletons/ModelInfoSkeleton";
import { ModelInfo } from "./ModelInfo";
import { BrandFilter } from "./BrandFilter";
import { ReviewTable } from "./ReviewTable";
import { SentimentChart, TrendChart, WordCloud } from "@/src/utils/dImports";
import { SentimentChart, TrendChart } from "@/src/utils/dImports";
import { useDashboards } from "@/src/hooks/useDashboard";
import SentimentForm from "./SentimentAnalyzer";
import { WordCloud } from "./WordCloud";
export default function DashboardClient() {
const {
@ -77,7 +80,7 @@ export default function DashboardClient() {
title="Sentimen Positif"
value={positiveCount}
suffix={`(${percentage(positiveCount, totalReviews)}%)`}
icon={ThumbsUp}
icon={Smile}
variant="positive"
delay={100}
/>
@ -86,7 +89,7 @@ export default function DashboardClient() {
title="Sentimen Negatif"
value={negativeCount}
suffix={`(${percentage(negativeCount, totalReviews)}%)`}
icon={ThumbsDown}
icon={Frown}
variant="negative"
delay={200}
/>
@ -95,7 +98,7 @@ export default function DashboardClient() {
title="Sentimen Netral"
value={neutralCount}
suffix={`(${percentage(neutralCount, totalReviews)}%)`}
icon={Minus}
icon={Meh}
variant="neutral"
delay={300}
/>
@ -121,7 +124,7 @@ export default function DashboardClient() {
Kata-kata yang sering muncul dalam ulasan berdasarkan kategori
sentimen
</p>
<WordCloud words={wordCloudData} />
<WordCloud />
</div>
{loading ? (

View File

@ -7,13 +7,13 @@ const TrendChart = dynamic(
})),
{ ssr: false },
);
const WordCloud = dynamic(
() =>
import("../components/dashboards/WordCloud").then((mod) => ({
default: mod.WordCloud,
})),
{ ssr: false },
);
// const WordCloud = dynamic(
// () =>
// import("../components/dashboards/WordCloud").then((mod) => ({
// default: mod.WordCloud,
// })),
// { ssr: false },
// );
const SentimentChart = dynamic(
() =>
import("../components/dashboards/SentimentChart").then((mod) => ({
@ -22,4 +22,4 @@ const SentimentChart = dynamic(
{ ssr: false },
);
export { TrendChart, WordCloud, SentimentChart };
export { TrendChart, SentimentChart };

View File

@ -51,7 +51,7 @@ export const getSentimentDisplay = (sentiment: string) => {
}
};
export const WORD_LIMIT = 20;
export const WORD_LIMIT = 15;
export const setWordCloud = ({ maxValue, minValue }: WordCloudConfig) => {
const getSize = (value: number) => {