Fix YouTube Music import (run sync ytmusicapi in thread), remove all Spotify UI
This commit is contained in:
@@ -2,7 +2,7 @@ import { useState } from 'react'
|
||||
import { Link, useNavigate } from 'react-router-dom'
|
||||
import { Disc3, Mail, Lock, User, Loader2 } from 'lucide-react'
|
||||
import { useAuth } from '../lib/auth'
|
||||
import { register as apiRegister, getSpotifyAuthUrl } from '../lib/api'
|
||||
import { register as apiRegister } from '../lib/api'
|
||||
|
||||
export default function Register() {
|
||||
const [name, setName] = useState('')
|
||||
@@ -29,15 +29,6 @@ export default function Register() {
|
||||
}
|
||||
}
|
||||
|
||||
const handleSpotifyLogin = async () => {
|
||||
try {
|
||||
const { url } = await getSpotifyAuthUrl()
|
||||
window.location.href = url
|
||||
} catch {
|
||||
setError('Could not connect to Spotify')
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-cream flex flex-col">
|
||||
{/* Header */}
|
||||
@@ -133,22 +124,6 @@ export default function Register() {
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div className="my-6 flex items-center gap-3">
|
||||
<div className="flex-1 h-px bg-purple-100" />
|
||||
<span className="text-xs text-charcoal-muted uppercase tracking-wider">or</span>
|
||||
<div className="flex-1 h-px bg-purple-100" />
|
||||
</div>
|
||||
|
||||
<button
|
||||
onClick={handleSpotifyLogin}
|
||||
className="w-full py-3 bg-[#1DB954] text-white font-semibold rounded-xl hover:bg-[#1aa34a] transition-colors cursor-pointer border-none text-sm flex items-center justify-center gap-2"
|
||||
>
|
||||
<svg className="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z" />
|
||||
</svg>
|
||||
Continue with Spotify
|
||||
</button>
|
||||
|
||||
<p className="text-center mt-6 text-sm text-charcoal-muted">
|
||||
Already have an account?{' '}
|
||||
<Link to="/login" className="text-purple font-medium hover:underline">
|
||||
|
||||
Reference in New Issue
Block a user