fix: TypeScript-Fehler in RadioTab (useRef + Globe Konstruktor)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel 2026-03-05 23:27:14 +01:00
parent 847c963d86
commit db55d41eee

View file

@ -65,7 +65,7 @@ export default function RadioTab({ data }: { data: any }) {
const [favorites, setFavorites] = useState<Favorite[]>([]);
const [showFavorites, setShowFavorites] = useState(false);
const [playingLoading, setPlayingLoading] = useState(false);
const searchTimeout = useRef<ReturnType<typeof setTimeout>>();
const searchTimeout = useRef<ReturnType<typeof setTimeout>>(undefined);
// ── Fetch initial data ──
useEffect(() => {
@ -93,7 +93,7 @@ export default function RadioTab({ data }: { data: any }) {
}, [data]);
// ── Point click handler (stable ref) ──
const handlePointClickRef = useRef<(point: any) => void>();
const handlePointClickRef = useRef<(point: any) => void>(undefined);
handlePointClickRef.current = (point: any) => {
setSelectedPlace(point);
setShowFavorites(false);
@ -117,7 +117,7 @@ export default function RadioTab({ data }: { data: any }) {
return;
}
const globe = Globe()(containerRef.current)
const globe = new Globe(containerRef.current)
.globeImageUrl('//unpkg.com/three-globe/example/img/earth-night.jpg')
.backgroundColor('rgba(0,0,0,0)')
.atmosphereColor('rgba(230, 126, 34, 0.25)')