diff --git a/frontend/src/components/LinkList.tsx b/frontend/src/components/LinkList.tsx
index 9b198ac..6f768cf 100644
--- a/frontend/src/components/LinkList.tsx
+++ b/frontend/src/components/LinkList.tsx
@@ -1,5 +1,3 @@
-import { lazy, Suspense } from 'react'
-
import { useEffect, useState } from 'react'
import { Link } from '../types/api'
import { getAllLinks, deleteLink } from '../api/client'
@@ -24,7 +22,7 @@ import {
DialogFooter,
} from "@/components/ui/dialog"
-const StatisticsModal = lazy(() => import('./StatisticsModal'))
+import { StatisticsModal } from "./StatisticsModal"
interface LinkListProps {
refresh?: number;
@@ -87,13 +85,13 @@ export function LinkList({ refresh = 0 }: LinkListProps) {
const baseUrl = window.location.origin
navigator.clipboard.writeText(`${baseUrl}/${shortCode}`)
toast({
- description: (
- <>
- Link copied to clipboard
-
- You can add ?source=TextHere to the end of the link to track the source of clicks
- >
- ),
+ description: (
+ <>
+ Link copied to clipboard
+
+ You can add ?source=TextHere to the end of the link to track the source of clicks
+ >
+ ),
})
}
@@ -188,15 +186,11 @@ export function LinkList({ refresh = 0 }: LinkListProps) {
- {statsModal.isOpen && (
- Loading...}>
- setStatsModal({ isOpen: false, linkId: null })}
- linkId={statsModal.linkId!}
- />
-
- )}
+ setStatsModal({ isOpen: false, linkId: null })}
+ linkId={statsModal.linkId!}
+ />
>
)
}
\ No newline at end of file
diff --git a/frontend/src/components/StatisticsModal.tsx b/frontend/src/components/StatisticsModal.tsx
index d1f6fbc..db936dd 100644
--- a/frontend/src/components/StatisticsModal.tsx
+++ b/frontend/src/components/StatisticsModal.tsx
@@ -58,7 +58,7 @@ const CustomTooltip = ({
return null;
};
-export default function StatisticsModal({ isOpen, onClose, linkId }: StatisticsModalProps) {
+export function StatisticsModal({ isOpen, onClose, linkId }: StatisticsModalProps) {
const [clicksOverTime, setClicksOverTime] = useState([]);
const [sourcesData, setSourcesData] = useState([]);
const [loading, setLoading] = useState(true);