mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 13:48:02 +00:00
feat: monorepo
This commit is contained in:
parent
4d54060a4f
commit
42089d4996
200 changed files with 1530 additions and 1521 deletions
|
|
@ -1,16 +0,0 @@
|
|||
import { colord } from 'colord'
|
||||
import { getCoverColor } from '../utils/common'
|
||||
|
||||
export default function useCoverColor(url: string) {
|
||||
const [color, setColor] = useState({ from: '#fff', to: '#fff' })
|
||||
|
||||
useEffect(() => {
|
||||
getCoverColor(url || '').then(color => {
|
||||
if (!color) return
|
||||
const to = colord(color).darken(0.15).rotate(-5).toHex()
|
||||
setColor({ from: color, to })
|
||||
})
|
||||
}, [url])
|
||||
|
||||
return color
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue