fix: remove unexpected props
This commit is contained in:
parent
e5a3262091
commit
dafd5ca196
|
|
@ -2,8 +2,11 @@
|
||||||
|
|
||||||
import { Header } from "./Header";
|
import { Header } from "./Header";
|
||||||
import {
|
import {
|
||||||
|
Frown,
|
||||||
|
Meh,
|
||||||
MessageSquareText,
|
MessageSquareText,
|
||||||
Minus,
|
Minus,
|
||||||
|
Smile,
|
||||||
ThumbsDown,
|
ThumbsDown,
|
||||||
ThumbsUp,
|
ThumbsUp,
|
||||||
TrendingUp,
|
TrendingUp,
|
||||||
|
|
@ -13,15 +16,15 @@ import {
|
||||||
brandData,
|
brandData,
|
||||||
sentimentDistribution,
|
sentimentDistribution,
|
||||||
trendData,
|
trendData,
|
||||||
wordCloudData,
|
|
||||||
} from "@/src/app/dashboard/lib/data";
|
} from "@/src/app/dashboard/lib/data";
|
||||||
import { ModelInfoSkeleton } from "../skeletons/ModelInfoSkeleton";
|
import { ModelInfoSkeleton } from "../skeletons/ModelInfoSkeleton";
|
||||||
import { ModelInfo } from "./ModelInfo";
|
import { ModelInfo } from "./ModelInfo";
|
||||||
import { BrandFilter } from "./BrandFilter";
|
import { BrandFilter } from "./BrandFilter";
|
||||||
import { ReviewTable } from "./ReviewTable";
|
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 { useDashboards } from "@/src/hooks/useDashboard";
|
||||||
import SentimentForm from "./SentimentAnalyzer";
|
import SentimentForm from "./SentimentAnalyzer";
|
||||||
|
import { WordCloud } from "./WordCloud";
|
||||||
|
|
||||||
export default function DashboardClient() {
|
export default function DashboardClient() {
|
||||||
const {
|
const {
|
||||||
|
|
@ -77,7 +80,7 @@ export default function DashboardClient() {
|
||||||
title="Sentimen Positif"
|
title="Sentimen Positif"
|
||||||
value={positiveCount}
|
value={positiveCount}
|
||||||
suffix={`(${percentage(positiveCount, totalReviews)}%)`}
|
suffix={`(${percentage(positiveCount, totalReviews)}%)`}
|
||||||
icon={ThumbsUp}
|
icon={Smile}
|
||||||
variant="positive"
|
variant="positive"
|
||||||
delay={100}
|
delay={100}
|
||||||
/>
|
/>
|
||||||
|
|
@ -86,7 +89,7 @@ export default function DashboardClient() {
|
||||||
title="Sentimen Negatif"
|
title="Sentimen Negatif"
|
||||||
value={negativeCount}
|
value={negativeCount}
|
||||||
suffix={`(${percentage(negativeCount, totalReviews)}%)`}
|
suffix={`(${percentage(negativeCount, totalReviews)}%)`}
|
||||||
icon={ThumbsDown}
|
icon={Frown}
|
||||||
variant="negative"
|
variant="negative"
|
||||||
delay={200}
|
delay={200}
|
||||||
/>
|
/>
|
||||||
|
|
@ -95,7 +98,7 @@ export default function DashboardClient() {
|
||||||
title="Sentimen Netral"
|
title="Sentimen Netral"
|
||||||
value={neutralCount}
|
value={neutralCount}
|
||||||
suffix={`(${percentage(neutralCount, totalReviews)}%)`}
|
suffix={`(${percentage(neutralCount, totalReviews)}%)`}
|
||||||
icon={Minus}
|
icon={Meh}
|
||||||
variant="neutral"
|
variant="neutral"
|
||||||
delay={300}
|
delay={300}
|
||||||
/>
|
/>
|
||||||
|
|
@ -121,7 +124,7 @@ export default function DashboardClient() {
|
||||||
Kata-kata yang sering muncul dalam ulasan berdasarkan kategori
|
Kata-kata yang sering muncul dalam ulasan berdasarkan kategori
|
||||||
sentimen
|
sentimen
|
||||||
</p>
|
</p>
|
||||||
<WordCloud words={wordCloudData} />
|
<WordCloud />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{loading ? (
|
{loading ? (
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@ const TrendChart = dynamic(
|
||||||
})),
|
})),
|
||||||
{ ssr: false },
|
{ ssr: false },
|
||||||
);
|
);
|
||||||
const WordCloud = dynamic(
|
// const WordCloud = dynamic(
|
||||||
() =>
|
// () =>
|
||||||
import("../components/dashboards/WordCloud").then((mod) => ({
|
// import("../components/dashboards/WordCloud").then((mod) => ({
|
||||||
default: mod.WordCloud,
|
// default: mod.WordCloud,
|
||||||
})),
|
// })),
|
||||||
{ ssr: false },
|
// { ssr: false },
|
||||||
);
|
// );
|
||||||
const SentimentChart = dynamic(
|
const SentimentChart = dynamic(
|
||||||
() =>
|
() =>
|
||||||
import("../components/dashboards/SentimentChart").then((mod) => ({
|
import("../components/dashboards/SentimentChart").then((mod) => ({
|
||||||
|
|
@ -22,4 +22,4 @@ const SentimentChart = dynamic(
|
||||||
{ ssr: false },
|
{ ssr: false },
|
||||||
);
|
);
|
||||||
|
|
||||||
export { TrendChart, WordCloud, SentimentChart };
|
export { TrendChart, SentimentChart };
|
||||||
|
|
|
||||||
|
|
@ -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) => {
|
export const setWordCloud = ({ maxValue, minValue }: WordCloudConfig) => {
|
||||||
const getSize = (value: number) => {
|
const getSize = (value: number) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue