I encountered an issue during Vercel deployment which displays the following error message:
-
Type error: Type ' ({ params }: DashboardPageProps) = Promise' is not compatible with type 'FC<.DashboardPageProps>'
Type 'Promise‹Element>' cannot be assigned to type 'ReactElement<any, any>
Below is the content of the
./app/(dashboard)/[storeId]/(routes)/page.tsx
file:
// necessary imports
interface DashboardPageProps {
params: { storeId: string }
}
const DashboardPage: React.FC<DashboardPageProps> = async ({
params
}) => {
const totalRevenue = await getTotalRevenue(params.storeId);
const salesCount = await getSalesCount(params.storeId);
const stockCount = await getStockCount(params.storeId);
const graphRevenue = await getGraphRevenue(params.storeId)
return (
//content for DashboardPage component
)
You can find the repository at: https://github.com/volfcan/ecommerce-admin