import Cart from '@/app/[locale]/(root)/(shop)/cart/cart'
import {auth} from '@/auth'
import {SessionUser} from '@/types/auth'

export default async function Page() {
	const session = await auth()
	if (!session) {
		return <Cart />
	}

	const {user} = session

	return session ? (
		<Cart user={user as unknown as SessionUser} />
	) : (
		<Cart user={null} />
	)
}
