fix: refactor breadcrumbs to take page type variants to better match margins
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { ValueOf } from "next/dist/shared/lib/constants"
|
||||
|
||||
import {
|
||||
GetAccountPageSettings,
|
||||
GetCollectionPageSettings,
|
||||
@@ -15,11 +13,13 @@ import { generateTag } from "@/utils/generateTag"
|
||||
|
||||
import {
|
||||
validateBookingWidgetToggleSchema,
|
||||
ValidateBookingWidgetToggleType,
|
||||
type ValidateBookingWidgetToggleType,
|
||||
} from "./output"
|
||||
import { affix as bookingwidgetAffix } from "./utils"
|
||||
|
||||
import { ContentTypeEnum } from "@/types/requests/contentType"
|
||||
import type { ValueOf } from "next/dist/shared/lib/constants"
|
||||
|
||||
import { PageContentTypeEnum } from "@/types/requests/contentType"
|
||||
|
||||
export const bookingwidgetQueryRouter = router({
|
||||
toggle: router({
|
||||
@@ -33,27 +33,27 @@ export const bookingwidgetQueryRouter = router({
|
||||
return failedResponse
|
||||
}
|
||||
let GetPageSettings = ""
|
||||
const contentTypeCMS = <ValueOf<typeof ContentTypeEnum>>(
|
||||
const contentTypeCMS = <ValueOf<typeof PageContentTypeEnum>>(
|
||||
contentType.replaceAll("-", "_")
|
||||
)
|
||||
|
||||
switch (contentTypeCMS) {
|
||||
case ContentTypeEnum.accountPage:
|
||||
case PageContentTypeEnum.accountPage:
|
||||
GetPageSettings = GetAccountPageSettings
|
||||
break
|
||||
case ContentTypeEnum.loyaltyPage:
|
||||
case PageContentTypeEnum.loyaltyPage:
|
||||
GetPageSettings = GetLoyaltyPageSettings
|
||||
break
|
||||
case ContentTypeEnum.collectionPage:
|
||||
case PageContentTypeEnum.collectionPage:
|
||||
GetPageSettings = GetCollectionPageSettings
|
||||
break
|
||||
case ContentTypeEnum.contentPage:
|
||||
case PageContentTypeEnum.contentPage:
|
||||
GetPageSettings = GetContentPageSettings
|
||||
break
|
||||
case ContentTypeEnum.hotelPage:
|
||||
case PageContentTypeEnum.hotelPage:
|
||||
GetPageSettings = GetHotelPageSettings
|
||||
break
|
||||
case ContentTypeEnum.currentBlocksPage:
|
||||
case PageContentTypeEnum.currentBlocksPage:
|
||||
GetPageSettings = GetCurrentBlocksPageSettings
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user