This project is a Spotify clone.
the hook is not importing. the error message says : React Hook “useSupabaseClient” is called in function “useloadArtistImage” that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word “use”.
Github: https://github.com/Jananisankar21419/spotify_2.0
useLoadArtistImages.tsx
import { Artist } from "@/types";
import { useSupabaseClient } from "@supabase/auth-helpers-react";
const useloadArtistImage = (artist: Artist) => {
const supabaseClient = useSupabaseClient();
if (!artist) {
return null;
}
const { data: imageData } = supabaseClient.storage
.from("images")
.getPublicUrl(artist.picture);
return imageData.publicUrl;
};
export default useloadArtistImage;
need some help with hooks which not importing from supabase