.move mainlayout to index

This commit is contained in:
skidoodle 2023-04-11 04:47:44 +02:00
parent 75025a11f3
commit da6a607b5d
2 changed files with 24 additions and 32 deletions

View file

@ -1,30 +0,0 @@
import { ThemeSwitcher } from '@/components/ThemeSwitcher';
import { NowPlayingCard } from '@/components/SpotifyCard';
import { SocialLayout } from '@/components/SocialLayout';
import { Toaster } from 'react-hot-toast';
import FadeIn from 'react-fade-in';
export const MainLayout = () => {
return (
<>
<ThemeSwitcher />
<FadeIn>
<div className='ml-[10%] mr-[10%]'>
<div className='flex flex-col max-w-3xl mx-auto mb-16 mt-32'>
<h1 className='text-7xl font-bold'>albert</h1>
<p className='text-2xl text-gray-600 mt-2 font-semibold'>
{Math.floor(
(new Date().getTime() - new Date('2004-07-22').getTime()) /
(1000 * 60 * 60 * 24 * 365.25),
)}
-year-old system administrator
</p>
<SocialLayout />
<NowPlayingCard />
<Toaster position='bottom-center' reverseOrder={false} />
</div>
</div>
</FadeIn>
</>
);
};

View file

@ -1,5 +1,27 @@
import { MainLayout } from '@/components/MainLayout'; import { ThemeSwitcher } from '@/components/ThemeSwitcher';
import { NowPlayingCard } from '@/components/SpotifyCard';
import { SocialLayout } from '@/components/SocialLayout';
import { Toaster } from 'react-hot-toast';
import age from '@/utils/age';
import FadeIn from 'react-fade-in';
export default function Home () { export default function Home () {
return <MainLayout />; return (
<>
<ThemeSwitcher />
<FadeIn>
<div className='ml-[10%] mr-[10%]'>
<div className='flex flex-col max-w-3xl mx-auto mb-16 mt-32'>
<h1 className='text-7xl font-bold'>albert</h1>
<p className='text-2xl text-gray-600 mt-2 font-semibold'>
{age()}-year-old system administrator
</p>
<SocialLayout />
<NowPlayingCard />
<Toaster position='top-left' />
</div>
</div>
</FadeIn>
</>
);
} }