Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
oogunjob committed Jan 27, 2024
1 parent 62ee6ad commit 4286c41
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ function Home() {
useEffect(() => {
// TODO: Remove this
console.log(process.env.NEXT_PUBLIC_APPLE_DEVELOPER_TOKEN ?? "");

// @ts-ignore
window.MusicKit?.configure({
developerToken: process.env.NEXT_PUBLIC_APPLE_DEVELOPER_TOKEN ?? "",
icon: "https://raw.githubusercontent.com/Musish/Musish/assets/misc/authIcon.png",
});
// window.MusicKit?.configure({
// developerToken: process.env.NEXT_PUBLIC_APPLE_DEVELOPER_TOKEN ?? "",
// icon: "https://raw.githubusercontent.com/Musish/Musish/assets/misc/authIcon.png",
// });

// @ts-ignore
const musicKit = new AppleMusicAPI(window.MusicKit?.getInstance());
// const musicKit = new AppleMusicAPI(window.MusicKit?.getInstance());
const spotifySDK = new SpotifySDK(SpotifySDK.CreateSDK());

setProviders([spotifySDK, musicKit]);
setProviders([spotifySDK, spotifySDK]);
}, []);

// const [loading, setLoading] = useState(true); // Use this to show the loading of the providers
Expand All @@ -71,10 +71,14 @@ function Home() {
* Handles logging in to the source provider
*/
const handleContinueSource = async () => {
const loggedIn = await selectedSource?.LogIn();
if (loggedIn) {
setSource(selectedSource);
}
// TODO: Remove this
console.log(process.env.NEXT_PUBLIC_APPLE_DEVELOPER_TOKEN ?? "Testing");

// TODO: Uncomment this
// const loggedIn = await selectedSource?.LogIn();
// if (loggedIn) {
// setSource(selectedSource);
// }
};

/**
Expand Down

0 comments on commit 4286c41

Please sign in to comment.