quick fixes

This commit is contained in:
yohlo
2025-10-06 13:33:25 -05:00
parent 45db283bc5
commit 49bbd1611c
4 changed files with 12 additions and 13 deletions

View File

@@ -2,13 +2,8 @@ import { useContext } from 'react';
import { SpotifyContext } from '@/contexts/spotify-context';
import type { SpotifyContextType } from './types';
export const useSpotify = (): SpotifyContextType => {
export const useSpotify = (): SpotifyContextType | null => {
const context = useContext(SpotifyContext);
if (!context) {
throw new Error('useSpotify must be used within a SpotifyProvider');
}
return context;
};