-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
193 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
import { getCarMakes } from '../../api/services/car-makes.service' | ||
import CarMakes from '../_components/car-specs/CarMakes' | ||
import ShopHeader from '../_components/ShopHeader' | ||
|
||
export default async function Autotech() { | ||
const carMakes = await getCarMakes(true) | ||
|
||
return ( | ||
<> | ||
<CarMakes carMakes={carMakes} /> | ||
{/* <div className='mt-24'> | ||
<ShopHeader | ||
id='autotech' | ||
name='Autotech Reprogrammation Moteur' | ||
phone='50 720 660' | ||
phoneText='RDV' | ||
location='https://www.google.com/maps/place/AutoTech+Reprogrammation+Moteur/@36.8799982,10.2991194,15z/data=!4m2!3m1!1s0x0:0x8e7d0ae9fd9aad0d?sa=X&ved=1t:2428&ictx=111' | ||
fb='https://www.facebook.com/autotechreprogrammation' | ||
insta='https://www.instagram.com/autotech_reprog' | ||
/> | ||
</div> */} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { getCarPosts } from '../../../api/services/car-posts.service' | ||
import { getMerchant } from '../../../api/services/merchants.service' | ||
import CarPostsFeed from '../../_components/car-posts/CarPosts' | ||
import ShopHeader from '../../_components/ShopHeader' | ||
import { fromQueryParamsToGetCarPostsFilters } from '../../helpers' | ||
|
||
export default async function MerchantPage({ | ||
searchParams, | ||
params | ||
}: { | ||
searchParams: Record<string, string | string[] | undefined> | ||
params: { merchantId: string } | ||
}) { | ||
const merchant = await getMerchant(params.merchantId) | ||
const filters = fromQueryParamsToGetCarPostsFilters(searchParams) | ||
filters.merchantId = merchant.id | ||
const posts = await getCarPosts(filters) | ||
|
||
return ( | ||
<> | ||
<ShopHeader | ||
id={merchant.id} | ||
name={merchant.name} | ||
phone={merchant.phone} | ||
location={merchant.gmapsLink} | ||
fb={merchant.fb} | ||
insta={merchant.insta} | ||
avatar={merchant.avatar} | ||
/> | ||
<div className='mb-8' /> | ||
<CarPostsFeed initialPosts={posts} initialFilters={filters} /> | ||
</> | ||
) | ||
} |
Oops, something went wrong.