.minor tweaks

This commit is contained in:
skidoodle 2023-04-11 04:48:30 +02:00
parent da6a607b5d
commit 9e7e5d00f3
2 changed files with 56 additions and 47 deletions

View file

@ -1,7 +1,8 @@
import { socials } from '@/components/data/Socials';
import Link from 'next/link'; import Link from 'next/link';
import toast from 'react-hot-toast'; import toast from 'react-hot-toast';
import copy from 'copy-to-clipboard'; import copy from 'copy-to-clipboard';
import { socials } from '@/components/data/Socials'; import FadeIn from 'react-fade-in';
type Icon = { type Icon = {
children: any; children: any;
@ -23,6 +24,7 @@ const notify = () => {
export const Icon = ({ children, reference, copyValue }: Icon) => { export const Icon = ({ children, reference, copyValue }: Icon) => {
if (copyValue) { if (copyValue) {
return ( return (
<FadeIn>
<Link <Link
href={''} href={''}
className={`cursor-pointer`} className={`cursor-pointer`}
@ -35,17 +37,22 @@ export const Icon = ({ children, reference, copyValue }: Icon) => {
> >
{children} {children}
</Link> </Link>
</FadeIn>
); );
} }
return ( return (
<FadeIn>
<Link <Link
href={reference} href={reference}
target='_blank' target='_blank'
className={'cursor-pointer'} className={'cursor-pointer'}
aria-label={socials.find((social) => social.ref === reference)?.ariaLabel} aria-label={
socials.find((social) => social.ref === reference)?.ariaLabel
}
> >
{children} {children}
</Link> </Link>
</FadeIn>
); );
}; };

View file

@ -1,9 +1,9 @@
import { truncate } from '@/utils/truncate'; import { truncate } from '@/utils/truncate';
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'; import { HiMusicNote } from 'react-icons/hi';
import Image from 'next/image';
import Link from 'next/link';
import FadeIn from 'react-fade-in';
import useSWR from 'swr';
export const fetcher = (url: RequestInfo) => fetch(url).then((r) => r.json()); export const fetcher = (url: RequestInfo) => fetch(url).then((r) => r.json());
@ -14,6 +14,7 @@ export const NowPlayingCard = () => {
}); });
return ( return (
<FadeIn>
<div className='mt-5 focus:outline-none transition duration-300 ease-in-out transform hover:scale-105 p-3 rounded-md border border-gray-800 shadow flex flex-row max-w-sm'> <div className='mt-5 focus:outline-none transition duration-300 ease-in-out transform hover:scale-105 p-3 rounded-md border border-gray-800 shadow flex flex-row max-w-sm'>
{spotify.song ? ( {spotify.song ? (
<Image <Image
@ -38,5 +39,6 @@ export const NowPlayingCard = () => {
</div> </div>
</div> </div>
</div> </div>
</FadeIn>
); );
}; };