import Image from "next/image"; import Link from "next/link"; import React, { useEffect } from "react"; import FadeIn from "react-fade-in"; import { socials } from "components/data/socials"; import { Icon } from "components/Icon"; import { Toaster } from "react-hot-toast"; import { FaSpotify } from "react-icons/fa"; import profilePic from "../public/profile.webp"; import { GetServerSideProps } from "next"; import { useRouter } from "next/router"; export default function ({ spotify }: any) { const { asPath, replace } = useRouter(); useEffect(() => { replace(asPath); }, [spotify]); return (
Profile Picture

albert

{Math.floor( (new Date().getTime() - new Date("2004-07-22").getTime()) / (1000 * 60 * 60 * 24 * 365.25) )} yrs old system administrator and student from Hungary


 

Listening to {spotify.song ? ( {" "} {spotify.song.title || "nothing"} ) : ( nothing )}

{socials.map((social) => ( {React.createElement(social.icon)} ))}
); } export const getServerSideProps: GetServerSideProps = async () => { const { HOST } = process.env; const res = await fetch(`${HOST}/api/spotify`); const data = await res.json(); return { props: { spotify: data }, }; };