diff --git a/.env.example b/.env.example index 3c0509e..9b6c633 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,3 @@ -SPOTIFY_CLIENT_ID= -SPOTIFY_CLIENT_SECRET= -SPOTIFY_REFRESH_TOKEN= NEXT_PUBLIC_SITE_URL= GITHUB_ACCESS_TOKEN= GITHUB_USER_ID= diff --git a/.env.gpg b/.env.gpg index 3c65502..928b9af 100644 Binary files a/.env.gpg and b/.env.gpg differ diff --git a/README.md b/README.md index 8b30257..32499c7 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ and skills, as well as provide information about me and my interests. - Database: [Supabase](https://supabase.com/) - Deployment: [Self-Hosted on Raspberry Pi 5](https://ryanfreeman.dev/writing/migrating-from-vercel-to-raspberry-pi-5) - Styling: [Tailwind CSS](https://tailwindcss.com/) -- Integrations: [Spotify](https://spotify.com/) ## Project structure diff --git a/app/api/spotify/currently-playing/route.ts b/app/api/spotify/currently-playing/route.ts deleted file mode 100644 index 1539053..0000000 --- a/app/api/spotify/currently-playing/route.ts +++ /dev/null @@ -1,54 +0,0 @@ -import {NextResponse} from 'next/server' -import {getCurrentlyPlaying} from '@/lib/spotify' - -type Song = { - item: { - album: { - name: string - images: [ - { - url: string - } - ] - } - artists: [ - { - name: string - } - ] - external_urls: { - spotify: string - } - name: string - } - is_playing: boolean -} - -export async function GET(request: Request) { - const response = await getCurrentlyPlaying() - - if (response.status === 204 || response.status > 400) { - return new Response(JSON.stringify({isPlaying: false}), { - status: 200 - }) - } - - const song = await response.json() as Song - const {item} = song - - const artist = item.artists.map(artist => artist.name).join(', ') - const title = item.name; - const songUrl = item.external_urls.spotify - const album = item.album.name - const albumImageUrl = item.album.images[0].url - const isPlaying = song.is_playing; - - return NextResponse.json({ - artist, - title, - songUrl, - album, - albumImageUrl, - isPlaying - }) -} \ No newline at end of file diff --git a/app/api/spotify/last-played/route.ts b/app/api/spotify/last-played/route.ts deleted file mode 100644 index 4a910af..0000000 --- a/app/api/spotify/last-played/route.ts +++ /dev/null @@ -1,56 +0,0 @@ -import {NextResponse} from 'next/server' -import {getRecentlyPlayed} from '@/lib/spotify' - -type Tracks = { - items: [ - { - track: { - name: string - artists: [ - { - name: string - } - ] - external_urls: { - spotify: string - } - album: { - name: string - images: [ - { - url: string - } - ] - } - } - played_at: string - } - ] -} - -export async function GET(request: Request) { - const response = await getRecentlyPlayed() - - if (response.status > 400) { - return new Response(JSON.stringify({status: response.statusText}), { - status: response.status - }) - } - - const tracks = await response.json() as Tracks - const {track} = tracks.items.reduce((r, a) => r.played_at > a.played_at ? r : a) - - const title = track.name; - const artist = track.artists.map(artist => artist.name).join(', ') - const songUrl = track.external_urls.spotify - const album = track.album.name - const albumImageUrl = track.album.images[0].url - - return NextResponse.json({ - artist, - title, - songUrl, - album, - albumImageUrl - }) -} \ No newline at end of file diff --git a/components/common/Footer.tsx b/components/common/Footer.tsx index 62d2f77..2b24059 100644 --- a/components/common/Footer.tsx +++ b/components/common/Footer.tsx @@ -1,7 +1,6 @@ import React from 'react' import {InnerContainer, OuterContainer} from './Container' import {NavLink} from '@/components/ui/Navigation' -import {SpotifyPlayer} from '@/components/ui/SpotifyPlayer' import {SocialLink} from '@/components/ui/SocialLink' import {GitHubIcon, LinkedInIcon} from '@/components/icons/SocialIcons' @@ -10,11 +9,8 @@ export function Footer() { return (