fix: TypeScript-Fehler in RadioTab (useRef + Globe Konstruktor)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
847c963d86
commit
db55d41eee
1 changed files with 3 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ export default function RadioTab({ data }: { data: any }) {
|
||||||
const [favorites, setFavorites] = useState<Favorite[]>([]);
|
const [favorites, setFavorites] = useState<Favorite[]>([]);
|
||||||
const [showFavorites, setShowFavorites] = useState(false);
|
const [showFavorites, setShowFavorites] = useState(false);
|
||||||
const [playingLoading, setPlayingLoading] = useState(false);
|
const [playingLoading, setPlayingLoading] = useState(false);
|
||||||
const searchTimeout = useRef<ReturnType<typeof setTimeout>>();
|
const searchTimeout = useRef<ReturnType<typeof setTimeout>>(undefined);
|
||||||
|
|
||||||
// ── Fetch initial data ──
|
// ── Fetch initial data ──
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -93,7 +93,7 @@ export default function RadioTab({ data }: { data: any }) {
|
||||||
}, [data]);
|
}, [data]);
|
||||||
|
|
||||||
// ── Point click handler (stable ref) ──
|
// ── Point click handler (stable ref) ──
|
||||||
const handlePointClickRef = useRef<(point: any) => void>();
|
const handlePointClickRef = useRef<(point: any) => void>(undefined);
|
||||||
handlePointClickRef.current = (point: any) => {
|
handlePointClickRef.current = (point: any) => {
|
||||||
setSelectedPlace(point);
|
setSelectedPlace(point);
|
||||||
setShowFavorites(false);
|
setShowFavorites(false);
|
||||||
|
|
@ -117,7 +117,7 @@ export default function RadioTab({ data }: { data: any }) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const globe = Globe()(containerRef.current)
|
const globe = new Globe(containerRef.current)
|
||||||
.globeImageUrl('//unpkg.com/three-globe/example/img/earth-night.jpg')
|
.globeImageUrl('//unpkg.com/three-globe/example/img/earth-night.jpg')
|
||||||
.backgroundColor('rgba(0,0,0,0)')
|
.backgroundColor('rgba(0,0,0,0)')
|
||||||
.atmosphereColor('rgba(230, 126, 34, 0.25)')
|
.atmosphereColor('rgba(230, 126, 34, 0.25)')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue