mirror of
https://github.com/navidrome/navidrome.git
synced 2026-02-02 06:24:14 +00:00
* Upgrade to CRA 4.0.3 * Try to fix tests. No lucky * Fix new ESLint errors * Fix JS tests and remove unwanted dependency. (#1106) * Fix tests * Fix lint * Remove React v16 workaround (fixed in v17) * Force eslint to break on warnings * Lint now needs to be called explicitly in the pipeline Co-authored-by: Yash Jipkate <34203227+YashJipkate@users.noreply.github.com>
18 lines
428 B
JavaScript
18 lines
428 B
JavaScript
import React, { useCallback } from 'react'
|
|
import { useDispatch } from 'react-redux'
|
|
import { Logout as RALogout } from 'react-admin'
|
|
import { clearQueue } from '../actions'
|
|
|
|
const Logout = (props) => {
|
|
const dispatch = useDispatch()
|
|
const handleClick = useCallback(() => dispatch(clearQueue()), [dispatch])
|
|
|
|
return (
|
|
<span onClick={handleClick}>
|
|
<RALogout {...props} />
|
|
</span>
|
|
)
|
|
}
|
|
|
|
export default Logout
|