mirror of
https://github.com/FranP-code/spooky-spotify-showcase.git
synced 2025-10-13 00:02:36 +00:00
Login button
This commit is contained in:
19
src/app/_components/spotify-icon.tsx
Normal file
19
src/app/_components/spotify-icon.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import React from "react";
|
||||
import type { SVGProps } from "react";
|
||||
|
||||
export function MdiSpotify(props: SVGProps<SVGSVGElement>) {
|
||||
return (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="1em"
|
||||
height="1em"
|
||||
viewBox="0 0 24 24"
|
||||
{...props}
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17.9 10.9C14.7 9 9.35 8.8 6.3 9.75c-.5.15-1-.15-1.15-.6c-.15-.5.15-1 .6-1.15c3.55-1.05 9.4-.85 13.1 1.35c.45.25.6.85.35 1.3c-.25.35-.85.5-1.3.25m-.1 2.8c-.25.35-.7.5-1.05.25c-2.7-1.65-6.8-2.15-9.95-1.15c-.4.1-.85-.1-.95-.5s.1-.85.5-.95c3.65-1.1 8.15-.55 11.25 1.35c.3.15.45.65.2 1m-1.2 2.75c-.2.3-.55.4-.85.2c-2.35-1.45-5.3-1.75-8.8-.95c-.35.1-.65-.15-.75-.45c-.1-.35.15-.65.45-.75c3.8-.85 7.1-.5 9.7 1.1c.35.15.4.55.25.85M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2"
|
||||
></path>
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { MdiSpotify } from "./spotify-icon";
|
||||
|
||||
export default function SpotifyLogin() {
|
||||
const loginToSpotify = () => {
|
||||
window.location.href = "/api/spotify-login";
|
||||
@@ -7,9 +9,10 @@ export default function SpotifyLogin() {
|
||||
|
||||
return (
|
||||
<button
|
||||
className="rounded bg-green-500 px-4 py-2 font-bold text-white hover:bg-green-700"
|
||||
className="flex items-center justify-center gap-1 rounded-full bg-green-500 py-2 pl-4 pr-5 font-bold text-white hover:bg-green-700"
|
||||
onClick={loginToSpotify}
|
||||
>
|
||||
<MdiSpotify className="h-10 w-10" />
|
||||
Login to Spotify
|
||||
</button>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user