A decentralized music tracking and discovery platform built on AT Protocol 馃幍 rocksky.app
spotify atproto lastfm musicbrainz scrobbling listenbrainz
at main 25 lines 675 B view raw
1import { useSearch } from "@tanstack/react-router"; 2import { Spinner } from "baseui/spinner"; 3import { useEffect } from "react"; 4import { API_URL } from "../../consts"; 5 6function Loading() { 7 const { handle, prompt } = useSearch({ strict: false }); 8 9 useEffect(() => { 10 if (prompt) { 11 window.location.href = `${API_URL}/login?prompt=${prompt}`; 12 } 13 if (handle) { 14 window.location.href = `${API_URL}/login?handle=${handle}`; 15 } 16 }, [handle, prompt]); 17 18 return ( 19 <div className="flex justify-center items-center h-screen bg-[#fff] fixed top-0 left-0 w-full"> 20 <Spinner $color="rgb(255, 40, 118)" /> 21 </div> 22 ); 23} 24 25export default Loading;