{section === RoundSection.START ? (
diff --git a/src/components/ImageBackdrop.tsx b/src/components/ImageBackdrop.tsx
deleted file mode 100644
index b552084..0000000
--- a/src/components/ImageBackdrop.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { PropsWithChildren } from "react";
-
-interface ImageBackdropProps extends PropsWithChildren {
- imageSrc: string;
-}
-
-const ImageBackdrop: React.FC
= ({
- imageSrc,
- children
-}) => {
- return (
-
-

- {children}
-
- );
-};
-
-export default ImageBackdrop;
-
-export type { ImageBackdropProps };
diff --git a/src/components/ImageBackdrop/backdrop.module.css b/src/components/ImageBackdrop/backdrop.module.css
new file mode 100644
index 0000000..83341b5
--- /dev/null
+++ b/src/components/ImageBackdrop/backdrop.module.css
@@ -0,0 +1,13 @@
+/* Generated with https://csshero.org/mesher/ */
+
+.defaultMeshBackground {
+ background-color:#ff99fc;
+ background-image:
+ radial-gradient(at 69% 30%, hsla(215,77%,70%,1) 0px, transparent 50%),
+ radial-gradient(at 25% 59%, hsla(273,69%,68%,1) 0px, transparent 50%),
+ radial-gradient(at 9% 55%, hsla(253,60%,70%,1) 0px, transparent 50%),
+ radial-gradient(at 26% 18%, hsla(285,75%,65%,1) 0px, transparent 50%),
+ radial-gradient(at 30% 59%, hsla(13,71%,65%,1) 0px, transparent 50%),
+ radial-gradient(at 20% 90%, hsla(42,70%,69%,1) 0px, transparent 50%),
+ radial-gradient(at 50% 10%, hsla(211,92%,72%,1) 0px, transparent 50%);
+}
\ No newline at end of file
diff --git a/src/components/ImageBackdrop/index.tsx b/src/components/ImageBackdrop/index.tsx
new file mode 100644
index 0000000..40cd575
--- /dev/null
+++ b/src/components/ImageBackdrop/index.tsx
@@ -0,0 +1,39 @@
+import { PropsWithChildren } from "react";
+import c from "clsx";
+
+import backdropCSSClasses from './backdrop.module.css'
+
+
+interface ImageBackdropProps extends PropsWithChildren {
+ imageSrc?: string;
+}
+
+const ImageBackdrop: React.FC = ({
+ imageSrc,
+ children
+}) => {
+ const hasImage = typeof imageSrc === "string" && imageSrc.length > 0;
+
+ const ImageTag = hasImage ? "img" : "div";
+ const imageClassName = c("w-full h-full object-cover opacity-80", {
+ [backdropCSSClasses.defaultMeshBackground]: !hasImage,
+ "blur-[128px]": hasImage,
+ });
+
+ return (
+
+ );
+};
+
+export default ImageBackdrop;
+
+export type { ImageBackdropProps };
diff --git a/src/components/Title/index.tsx b/src/components/Title/index.tsx
index 80860ca..3f9719b 100644
--- a/src/components/Title/index.tsx
+++ b/src/components/Title/index.tsx
@@ -1,5 +1,4 @@
import { useState } from "react";
-
import { motion } from "framer-motion";
import useGame, { progressGameFlow } from "@/modules/state";
@@ -27,7 +26,7 @@ const Title: React.FC = () => {
});
return (
-
+
{/* Title */}
{
+ generateCodeChallenge(codeVerifier).then(codeChallenge => {
+ let state = generateRandomString(16);
+ let scope = "user-read-private user-read-email"; // @TODO Change me
+
+ localStorage.setItem("code_verifier", codeVerifier);
+
+ let args = new URLSearchParams({
+ response_type: "code",
+ client_id: clientId,
+ scope: scope,
+ redirect_uri: redirectUri,
+ state: state,
+ code_challenge_method: "S256",
+ code_challenge: codeChallenge
+ });
+
+ window.location = "https://accounts.spotify.com/authorize?" + args;
+ });
+}
diff --git a/src/modules/spotify/index.ts b/src/modules/spotify/index.ts
index c8332e8..ffbe576 100644
--- a/src/modules/spotify/index.ts
+++ b/src/modules/spotify/index.ts
@@ -10,7 +10,7 @@ const prepareSpotifyWebPlaybackSDKReadyCallback = (): void => {
// Create a global callback called onSpotifyWebPlaybackSDKReady
// This will be called when the SDK is ready and Spotify.Player is available
// skips type checking on window
- (window).onSpotifyWebPlaybackSDKReady = () => {
+ (window as any).onSpotifyWebPlaybackSDKReady = () => {
// You can now initialize Spotify.Player and use the SDK
useSpotify.setState({ sdkReady: true });
@@ -23,7 +23,7 @@ const prepareSpotifyWebPlaybackSDKReadyCallback = (): void => {
}
};
- const player: SpotifyPlayer = new (window).Spotify.Player(
+ const player: SpotifyPlayer = new (window as any).Spotify.Player(
spotifyPlayerConstructorOptions
);
diff --git a/src/modules/spotify/web-api.ts b/src/modules/spotify/web-api.ts
index ee969db..0a0768a 100644
--- a/src/modules/spotify/web-api.ts
+++ b/src/modules/spotify/web-api.ts
@@ -60,14 +60,14 @@ export const requestTracksData = async (ids: string[]): Promise