testing yuk
This commit is contained in:
@@ -8,7 +8,7 @@ import { useTheme } from "next-themes";
|
||||
import { ExternalLink } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
|
||||
// Import ApexCharts secara dinamis untuk menghindari error SSR
|
||||
// Import ApexCharts secara dinamis untuk menghindari masalah SSR
|
||||
const Chart = dynamic(() => import('react-apexcharts'), { ssr: false });
|
||||
|
||||
interface MahasiswaStatistik {
|
||||
@@ -174,7 +174,7 @@ export default function StatistikMahasiswaChart({
|
||||
const statistikData = await statistikResponse.json();
|
||||
setStatistikData(statistikData);
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : 'An error occurred');
|
||||
setError(err instanceof Error ? err.message : 'Terjadi kesalahan');
|
||||
console.error('Error fetching data:', err);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
@@ -184,7 +184,7 @@ export default function StatistikMahasiswaChart({
|
||||
fetchData();
|
||||
}, []);
|
||||
|
||||
// Update theme when it changes
|
||||
// Perbarui tema saat berubah
|
||||
useEffect(() => {
|
||||
const currentTheme = theme;
|
||||
const textColor = currentTheme === 'dark' ? '#fff' : '#000';
|
||||
@@ -253,7 +253,7 @@ export default function StatistikMahasiswaChart({
|
||||
}));
|
||||
}, [theme]);
|
||||
|
||||
// Update categories when data changes
|
||||
// Perbarui kategori saat data berubah
|
||||
useEffect(() => {
|
||||
if (statistikData.length > 0) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user