'use client';

import { CryptoProvider } from '@/contexts/cryptoProvider';
import Layout from '@/app/component/Layout';
import CryptoDashboard from './CryptoDashboard';
import CryptoSidebar from './CryptoSidebar';
import PopupModal from '@/app/component/PopupModal';
import type { TickerRestData } from '@/types/crypto';

type Props = {
	initialTickers: TickerRestData[];
};

export default function CryptoPageContent({ initialTickers }: Props) {
	return (
		<CryptoProvider>
			<Layout sidebarContent={<CryptoSidebar initialTickers={initialTickers} />}>
				<PopupModal position='main' />
				<CryptoDashboard />
			</Layout>
		</CryptoProvider>
	);
}