Ayo Commit
This commit is contained in:
@@ -18,7 +18,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export default function StatistikPerAngkatanChart({ tahunAngkatan }: Props) {
|
||||
const { theme, systemTheme } = useTheme();
|
||||
const { theme } = useTheme();
|
||||
const [statistikData, setStatistikData] = useState<GenderStatistik[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
@@ -121,7 +121,7 @@ export default function StatistikPerAngkatanChart({ tahunAngkatan }: Props) {
|
||||
|
||||
// Update theme when it changes
|
||||
useEffect(() => {
|
||||
const currentTheme = theme === 'system' ? systemTheme : theme;
|
||||
const currentTheme = theme;
|
||||
const textColor = currentTheme === 'dark' ? '#fff' : '#000';
|
||||
const tooltipTheme = currentTheme === 'dark' ? 'dark' : 'light';
|
||||
|
||||
@@ -150,7 +150,7 @@ export default function StatistikPerAngkatanChart({ tahunAngkatan }: Props) {
|
||||
theme: tooltipTheme
|
||||
}
|
||||
}));
|
||||
}, [theme, systemTheme]);
|
||||
}, [theme]);
|
||||
|
||||
// Update dataLabels formatter when data changes
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user