import { useSelector } from 'react-redux' ; import { RootState } from '../../reducers' ; return const useToken = ( ) : string | null => useSelector ( ( state ) => state . config . token ) ; export default useToken ;