grand commit
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
import {getCatalogIndexData} from '@prisma/client/sql'
|
||||
import {getLocale} from 'next-intl/server'
|
||||
import Image from 'next/image'
|
||||
|
||||
import FeatureCards from '@/components/shared/home/feature-cards'
|
||||
import {HomeCarousel} from '@/components/shared/home/home-carousel'
|
||||
import AppCatalog from '@/components/shared/sidebar/app-catalog'
|
||||
import FeatureCardFront from '@/components/shared/store/feature-card-front'
|
||||
import {carousels} from '@/lib/data'
|
||||
import {CategoryPageSqlSchema} from '@/lib/data/models/sqlSchemas'
|
||||
import {db} from '@/lib/db/prisma/client'
|
||||
import {dump} from '@/lib/utils'
|
||||
import mainFallback from '@/public/main-fallback.jpg'
|
||||
import image from '@/public/uploads/products/IMG_6572.jpg'
|
||||
|
||||
// const storeModel = async (id: any) => {
|
||||
@@ -26,6 +31,11 @@ import image from '@/public/uploads/products/IMG_6572.jpg'
|
||||
// }
|
||||
|
||||
export default async function HomePage() {
|
||||
const loc = await getLocale()
|
||||
const catalog: CategoryPageSqlSchema[] = await db.$queryRawTyped(
|
||||
getCatalogIndexData(loc)
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className='mt-1'>
|
||||
@@ -34,18 +44,27 @@ export default async function HomePage() {
|
||||
<AppCatalog />
|
||||
</section>
|
||||
<div className='bw-layout-col-right pt-3'>
|
||||
{/*<pre>{dump(await storeModel(1))}</pre>*/}
|
||||
<section className='w-full'>
|
||||
<HomeCarousel items={carousels}></HomeCarousel>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/*<pre>{JSON.stringify(session)}</pre>*/}
|
||||
|
||||
<section className='mb-4 mt-[128px]'>
|
||||
<div className='container'>
|
||||
<FeatureCards />
|
||||
<section className='container mb-4 mt-[128px]'>
|
||||
<FeatureCards items={catalog} />
|
||||
<div className='re relative my-12 overflow-hidden'>
|
||||
<Image
|
||||
alt={''}
|
||||
width={1440}
|
||||
height={753}
|
||||
src={mainFallback}
|
||||
sizes='100vw'
|
||||
style={{
|
||||
width: '100%',
|
||||
height: 'auto'
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user