chore: cleanup
This commit is contained in:
@@ -4,12 +4,13 @@ import { request } from "@/lib/graphql/request"
|
|||||||
import { notFound } from "@/server/errors/trpc"
|
import { notFound } from "@/server/errors/trpc"
|
||||||
import { contentstackExtendedProcedureUID, router } from "@/server/trpc"
|
import { contentstackExtendedProcedureUID, router } from "@/server/trpc"
|
||||||
|
|
||||||
|
import { makeImageVaultImage } from "@/utils/imageVault"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ContentPage,
|
ContentPage,
|
||||||
ContentPageDataRaw,
|
ContentPageDataRaw,
|
||||||
validateContentPageSchema,
|
validateContentPageSchema,
|
||||||
} from "./output"
|
} from "./output"
|
||||||
import { makeImageVaultImage } from "./utils"
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
TrackingChannelEnum,
|
TrackingChannelEnum,
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
import { insertResponseToImageVaultAsset } from "@/utils/imageVault"
|
|
||||||
|
|
||||||
import { InsertResponse } from "@/types/components/imageVaultImage"
|
|
||||||
|
|
||||||
export function makeImageVaultImage(image: any) {
|
|
||||||
return image && !!Object.keys(image).length
|
|
||||||
? insertResponseToImageVaultAsset(image as InsertResponse)
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
generateTag,
|
generateTag,
|
||||||
generateTags,
|
generateTags,
|
||||||
} from "@/utils/generateTag"
|
} from "@/utils/generateTag"
|
||||||
|
import { makeImageVaultImage } from "@/utils/imageVault"
|
||||||
import { removeMultipleSlashes } from "@/utils/url"
|
import { removeMultipleSlashes } from "@/utils/url"
|
||||||
|
|
||||||
import { removeEmptyObjects } from "../../utils"
|
import { removeEmptyObjects } from "../../utils"
|
||||||
@@ -21,7 +22,7 @@ import {
|
|||||||
validateLoyaltyPageRefsSchema,
|
validateLoyaltyPageRefsSchema,
|
||||||
validateLoyaltyPageSchema,
|
validateLoyaltyPageSchema,
|
||||||
} from "./output"
|
} from "./output"
|
||||||
import { getConnections, makeButtonObject, makeImageVaultImage } from "./utils"
|
import { getConnections, makeButtonObject } from "./utils"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
LoyaltyBlocksTypenameEnum,
|
LoyaltyBlocksTypenameEnum,
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import { insertResponseToImageVaultAsset } from "@/utils/imageVault"
|
|
||||||
import { removeMultipleSlashes } from "@/utils/url"
|
import { removeMultipleSlashes } from "@/utils/url"
|
||||||
|
|
||||||
import { LoyaltyPageRefsDataRaw } from "./output"
|
import { LoyaltyPageRefsDataRaw } from "./output"
|
||||||
|
|
||||||
import { InsertResponse } from "@/types/components/imageVaultImage"
|
|
||||||
import {
|
import {
|
||||||
LoyaltyBlocksTypenameEnum,
|
LoyaltyBlocksTypenameEnum,
|
||||||
LoyaltyCardsGridEnum,
|
LoyaltyCardsGridEnum,
|
||||||
@@ -81,13 +79,6 @@ export function getConnections(refs: LoyaltyPageRefsDataRaw) {
|
|||||||
|
|
||||||
return connections
|
return connections
|
||||||
}
|
}
|
||||||
|
|
||||||
export function makeImageVaultImage(image: any) {
|
|
||||||
return image && !!Object.keys(image).length
|
|
||||||
? insertResponseToImageVaultAsset(image as InsertResponse)
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
|
|
||||||
export function makeButtonObject(button: any) {
|
export function makeButtonObject(button: any) {
|
||||||
if (!button) return null
|
if (!button) return null
|
||||||
|
|
||||||
|
|||||||
@@ -29,3 +29,9 @@ export function insertResponseToImageVaultAsset(
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function makeImageVaultImage(image: any) {
|
||||||
|
return image && !!Object.keys(image).length
|
||||||
|
? insertResponseToImageVaultAsset(image as InsertResponse)
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user