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