fix navbar lang switcher
This commit is contained in:
@@ -52,8 +52,6 @@ interface CompanyCard {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type MarketplaceCity = string
|
|
||||||
|
|
||||||
const CATEGORY_VALUES = [
|
const CATEGORY_VALUES = [
|
||||||
'ECONOMY',
|
'ECONOMY',
|
||||||
'COMPACT',
|
'COMPACT',
|
||||||
@@ -72,7 +70,7 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Rec
|
|||||||
kicker: 'Discovery only',
|
kicker: 'Discovery only',
|
||||||
title: 'Find your next rental from trusted local companies.',
|
title: 'Find your next rental from trusted local companies.',
|
||||||
body: 'Browse, filter, and reserve — the company confirms and contacts you directly.',
|
body: 'Browse, filter, and reserve — the company confirms and contacts you directly.',
|
||||||
searchTitle: 'Book a vehicle',
|
searchTitle: 'Find a vehicle',
|
||||||
pickupLocation: 'Pick-up location',
|
pickupLocation: 'Pick-up location',
|
||||||
dropoffLocation: 'Drop-off location',
|
dropoffLocation: 'Drop-off location',
|
||||||
pickupDate: 'Start date',
|
pickupDate: 'Start date',
|
||||||
@@ -80,7 +78,6 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Rec
|
|||||||
hour: 'Hour',
|
hour: 'Hour',
|
||||||
promoCode: 'I have a promo code',
|
promoCode: 'I have a promo code',
|
||||||
myAge: 'My age',
|
myAge: 'My age',
|
||||||
ageDescription: 'We use your age to estimate your rental price more accurately. Some age groups may have extra fees.',
|
|
||||||
ageOptions: ['18+', '21+', '23+', '25+', '30+'],
|
ageOptions: ['18+', '21+', '23+', '25+', '30+'],
|
||||||
search: 'Search',
|
search: 'Search',
|
||||||
currentDeals: 'Current deals',
|
currentDeals: 'Current deals',
|
||||||
@@ -123,7 +120,6 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Rec
|
|||||||
hour: 'Heure',
|
hour: 'Heure',
|
||||||
promoCode: "J'ai un code promo",
|
promoCode: "J'ai un code promo",
|
||||||
myAge: 'Mon âge',
|
myAge: 'Mon âge',
|
||||||
ageDescription: "Nous utilisons votre âge pour estimer plus précisément le prix de location. Des frais supplémentaires peuvent s'appliquer selon la tranche d'âge.",
|
|
||||||
ageOptions: ['18+', '21+', '23+', '25+', '30+'],
|
ageOptions: ['18+', '21+', '23+', '25+', '30+'],
|
||||||
search: 'Rechercher',
|
search: 'Rechercher',
|
||||||
currentDeals: 'Offres du moment',
|
currentDeals: 'Offres du moment',
|
||||||
@@ -166,7 +162,6 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Rec
|
|||||||
hour: 'الساعة',
|
hour: 'الساعة',
|
||||||
promoCode: 'لدي رمز ترويجي',
|
promoCode: 'لدي رمز ترويجي',
|
||||||
myAge: 'عمري',
|
myAge: 'عمري',
|
||||||
ageDescription: 'نستخدم عمرك لتقديم تقدير أدق لسعر الإيجار. قد يتم تطبيق رسوم إضافية لبعض الفئات العمرية.',
|
|
||||||
ageOptions: ['18+', '21+', '23+', '25+', '30+'],
|
ageOptions: ['18+', '21+', '23+', '25+', '30+'],
|
||||||
search: 'بحث',
|
search: 'بحث',
|
||||||
currentDeals: 'العروض الحالية',
|
currentDeals: 'العروض الحالية',
|
||||||
@@ -207,7 +202,7 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Rec
|
|||||||
const returnDate = typeof searchParams?.returnDate === 'string' ? searchParams.returnDate : ''
|
const returnDate = typeof searchParams?.returnDate === 'string' ? searchParams.returnDate : ''
|
||||||
const returnTime = typeof searchParams?.returnTime === 'string' ? searchParams.returnTime : '10:00'
|
const returnTime = typeof searchParams?.returnTime === 'string' ? searchParams.returnTime : '10:00'
|
||||||
const promoCode = typeof searchParams?.promoCode === 'string' ? searchParams.promoCode : ''
|
const promoCode = typeof searchParams?.promoCode === 'string' ? searchParams.promoCode : ''
|
||||||
const driverAge = typeof searchParams?.driverAge === 'string' ? searchParams.driverAge : '25+'
|
const driverAge = typeof searchParams?.driverAge === 'string' ? searchParams.driverAge : '23+'
|
||||||
const category = typeof searchParams?.category === 'string' ? searchParams.category : ''
|
const category = typeof searchParams?.category === 'string' ? searchParams.category : ''
|
||||||
const transmission = typeof searchParams?.transmission === 'string' ? searchParams.transmission : ''
|
const transmission = typeof searchParams?.transmission === 'string' ? searchParams.transmission : ''
|
||||||
const make = typeof searchParams?.make === 'string' ? searchParams.make : ''
|
const make = typeof searchParams?.make === 'string' ? searchParams.make : ''
|
||||||
@@ -225,11 +220,10 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Rec
|
|||||||
if (model) query.set('model', model)
|
if (model) query.set('model', model)
|
||||||
query.set('pageSize', '24')
|
query.set('pageSize', '24')
|
||||||
|
|
||||||
const [offers, vehicles, companies, cities] = await Promise.all([
|
const [offers, vehicles, companies] = await Promise.all([
|
||||||
marketplaceFetchOrDefault<Offer[]>('/marketplace/offers', []),
|
marketplaceFetchOrDefault<Offer[]>('/marketplace/offers', []),
|
||||||
marketplaceFetchOrDefault<Vehicle[]>(`/marketplace/search?${query.toString()}`, []),
|
marketplaceFetchOrDefault<Vehicle[]>(`/marketplace/search?${query.toString()}`, []),
|
||||||
marketplaceFetchOrDefault<CompanyCard[]>('/marketplace/companies?pageSize=8', []),
|
marketplaceFetchOrDefault<CompanyCard[]>('/marketplace/companies?pageSize=8', []),
|
||||||
marketplaceFetchOrDefault<MarketplaceCity[]>('/marketplace/cities', []),
|
|
||||||
])
|
])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -248,7 +242,6 @@ export default async function ExplorePage({ searchParams }: { searchParams?: Rec
|
|||||||
returnTime={returnTime}
|
returnTime={returnTime}
|
||||||
promoCode={promoCode}
|
promoCode={promoCode}
|
||||||
driverAge={driverAge}
|
driverAge={driverAge}
|
||||||
cities={cities}
|
|
||||||
dict={dict}
|
dict={dict}
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Reference in New Issue
Block a user