From 56e6282f685f2787761bfa1f6b8231e1999a9f87 Mon Sep 17 00:00:00 2001 From: skidoodle <53189968+skidoodle@users.noreply.github.com> Date: Tue, 11 Apr 2023 04:17:14 +0200 Subject: [PATCH] .minor changes --- src/components/MainLayout.tsx | 2 +- src/components/SocialLayout.tsx | 24 +++++++-------- src/components/SpotifyCard.tsx | 52 +++++++++++++++------------------ src/pages/index.tsx | 6 +--- 4 files changed, 36 insertions(+), 48 deletions(-) diff --git a/src/components/MainLayout.tsx b/src/components/MainLayout.tsx index bfa867b..6cc8541 100644 --- a/src/components/MainLayout.tsx +++ b/src/components/MainLayout.tsx @@ -12,7 +12,7 @@ export const MainLayout = () => {

albert

-

+

{Math.floor( (new Date().getTime() - new Date('2004-07-22').getTime()) / (1000 * 60 * 60 * 24 * 365.25), diff --git a/src/components/SocialLayout.tsx b/src/components/SocialLayout.tsx index 60785b6..54bf6ff 100644 --- a/src/components/SocialLayout.tsx +++ b/src/components/SocialLayout.tsx @@ -4,18 +4,16 @@ import React from 'react'; export const SocialLayout = () => { return ( - <> -

- {socials.map((social) => ( - - {React.createElement(social.icon)} - - ))} -
- +
+ {socials.map((social) => ( + + {React.createElement(social.icon)} + + ))} +
); }; diff --git a/src/components/SpotifyCard.tsx b/src/components/SpotifyCard.tsx index 1a288e8..3818471 100644 --- a/src/components/SpotifyCard.tsx +++ b/src/components/SpotifyCard.tsx @@ -1,9 +1,9 @@ import { truncate } from '@/utils/truncate'; -import FadeIn from 'react-fade-in'; import Image from 'next/image'; import useSWR from 'swr'; import SongImage from '@/public/song.webp'; import Link from 'next/link'; +import { HiMusicNote } from 'react-icons/hi'; export const fetcher = (url: RequestInfo) => fetch(url).then((r) => r.json()); @@ -14,35 +14,29 @@ export const NowPlayingCard = () => { }); return ( - -
- {spotify.song ? ( - Song cover art - ) : ( - Song cover art - )} -
-
- Listening to{' '} - {spotify.song ? ( - - {truncate(`${spotify.song.title}`, 20)} - - ) : ( - nothing - )} -
+
+ {spotify.song ? ( + Song cover art + ) : ( + + )} +
+
+ Listening to{' '} + {spotify.song ? ( + + {truncate(`${spotify.song.title}`, 20)} + + ) : ( + nothing + )}
- +
); }; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c6875cf..3679327 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,9 +1,5 @@ import { MainLayout } from '@/components/MainLayout'; export default function Home () { - return ( - <> - - - ); + return ; }