quick fixes
This commit is contained in:
@@ -19,6 +19,10 @@ const SpotifyControlsBar = () => {
|
||||
const isAdmin = roles?.includes('Admin') || false;
|
||||
const [sheetOpened, { open: openSheet, close: closeSheet }] = useDisclosure(false);
|
||||
|
||||
const spotify = useSpotify();
|
||||
|
||||
if (!isAdmin || !spotify) return null;
|
||||
|
||||
const {
|
||||
isAuthenticated,
|
||||
playbackState,
|
||||
@@ -35,9 +39,7 @@ const SpotifyControlsBar = () => {
|
||||
isResumeLoading,
|
||||
capturePlaybackState,
|
||||
resumePlaybackState,
|
||||
} = useSpotify();
|
||||
|
||||
if (!isAdmin) return null;
|
||||
} = spotify;
|
||||
|
||||
if (!isAuthenticated) {
|
||||
return (
|
||||
|
||||
@@ -27,7 +27,9 @@ interface SpotifySheetProps {
|
||||
const SpotifySheet: React.FC<SpotifySheetProps> = ({ opened, onClose }) => {
|
||||
const { roles } = useAuth();
|
||||
const isAdmin = roles?.includes('Admin') || false;
|
||||
const spotify = useSpotify();
|
||||
|
||||
if (!isAdmin || !spotify) return null;
|
||||
const {
|
||||
isAuthenticated,
|
||||
login,
|
||||
@@ -39,7 +41,7 @@ const SpotifySheet: React.FC<SpotifySheetProps> = ({ opened, onClose }) => {
|
||||
setActiveDevice,
|
||||
isLoading,
|
||||
error,
|
||||
} = useSpotify();
|
||||
} = spotify;
|
||||
|
||||
if (!isAdmin) return null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user