[enhancement]: add server menu on Navidrome error page

This commit is contained in:
Kendall Garner 2024-03-31 17:47:17 -07:00
parent e0e967385f
commit 44fcc33825
No known key found for this signature in database
GPG key ID: 18D2767419676C87
3 changed files with 32 additions and 4 deletions

View file

@ -4,6 +4,7 @@ import { AuthState, ServerListItem, ServerType } from '/@/renderer/types';
import { api } from '/@/renderer/api';
import { SongListSort, SortOrder } from '/@/renderer/api/types';
import { debounce } from 'lodash';
import { toast } from '/@/renderer/components';
export const useServerAuthenticated = () => {
const priorServerId = useRef<string>();
@ -29,6 +30,7 @@ export const useServerAuthenticated = () => {
setReady(AuthState.VALID);
} catch (error) {
toast.error({ message: (error as Error).message });
setReady(AuthState.INVALID);
}
}, []);