refactor: move all loyalty enums to new file
This commit is contained in:
@@ -11,7 +11,7 @@ import type {
|
|||||||
DynamicComponentProps,
|
DynamicComponentProps,
|
||||||
DynamicContentProps,
|
DynamicContentProps,
|
||||||
} from "@/types/components/loyalty/blocks"
|
} from "@/types/components/loyalty/blocks"
|
||||||
import { LoyaltyComponentEnum } from "@/types/requests/loyaltyPage"
|
import { LoyaltyComponentEnum } from "@/types/components/loyalty/enums"
|
||||||
|
|
||||||
function DynamicComponentBlock({ component }: DynamicComponentProps) {
|
function DynamicComponentBlock({ component }: DynamicComponentProps) {
|
||||||
switch (component) {
|
switch (component) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import DynamicContentBlock from "@/components/Loyalty/Blocks/DynamicContent"
|
|||||||
import CardGrid from "./CardGrid"
|
import CardGrid from "./CardGrid"
|
||||||
|
|
||||||
import type { BlocksProps } from "@/types/components/loyalty/blocks"
|
import type { BlocksProps } from "@/types/components/loyalty/blocks"
|
||||||
import { LoyaltyBlocksTypenameEnum } from "@/types/requests/loyaltyPage"
|
import { LoyaltyBlocksTypenameEnum } from "@/types/components/loyalty/enums"
|
||||||
|
|
||||||
export function Blocks({ blocks }: BlocksProps) {
|
export function Blocks({ blocks }: BlocksProps) {
|
||||||
return blocks.map((block) => {
|
return blocks.map((block) => {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import ContactRow from "./ContactRow"
|
|||||||
|
|
||||||
import styles from "./contact.module.css"
|
import styles from "./contact.module.css"
|
||||||
|
|
||||||
|
import { JoinLoyaltyContactTypenameEnum } from "@/types/components/loyalty/enums"
|
||||||
import type { ContactProps } from "@/types/components/loyalty/sidebar"
|
import type { ContactProps } from "@/types/components/loyalty/sidebar"
|
||||||
import { JoinLoyaltyContactTypenameEnum } from "@/types/requests/loyaltyPage"
|
|
||||||
|
|
||||||
export default async function Contact({ contactBlock }: ContactProps) {
|
export default async function Contact({ contactBlock }: ContactProps) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import JoinLoyaltyContact from "./JoinLoyalty"
|
|||||||
|
|
||||||
import styles from "./sidebar.module.css"
|
import styles from "./sidebar.module.css"
|
||||||
|
|
||||||
|
import { SidebarTypenameEnum } from "@/types/components/loyalty/enums"
|
||||||
import { SidebarProps } from "@/types/components/loyalty/sidebar"
|
import { SidebarProps } from "@/types/components/loyalty/sidebar"
|
||||||
import { SidebarTypenameEnum } from "@/types/requests/loyaltyPage"
|
|
||||||
|
|
||||||
export default function SidebarLoyalty({ blocks }: SidebarProps) {
|
export default function SidebarLoyalty({ blocks }: SidebarProps) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { z } from "zod"
|
import { z } from "zod"
|
||||||
|
|
||||||
import { Embeds } from "@/types/requests/embeds"
|
|
||||||
import {
|
import {
|
||||||
JoinLoyaltyContactTypenameEnum,
|
JoinLoyaltyContactTypenameEnum,
|
||||||
LoyaltyBlocksTypenameEnum,
|
LoyaltyBlocksTypenameEnum,
|
||||||
LoyaltyComponentEnum,
|
LoyaltyComponentEnum,
|
||||||
SidebarTypenameEnum,
|
SidebarTypenameEnum,
|
||||||
} from "@/types/requests/loyaltyPage"
|
} from "@/types/components/loyalty/enums"
|
||||||
|
import { Embeds } from "@/types/requests/embeds"
|
||||||
import { Edges } from "@/types/requests/utils/edges"
|
import { Edges } from "@/types/requests/utils/edges"
|
||||||
import { RTEDocument } from "@/types/rte/node"
|
import { RTEDocument } from "@/types/rte/node"
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ import { publicProcedure, router } from "@/server/trpc"
|
|||||||
import { getLoyaltyPageInput } from "./input"
|
import { getLoyaltyPageInput } from "./input"
|
||||||
import { type LoyaltyPage, validateLoyaltyPageSchema } from "./output"
|
import { type LoyaltyPage, validateLoyaltyPageSchema } from "./output"
|
||||||
|
|
||||||
import { Embeds } from "@/types/requests/embeds"
|
|
||||||
import {
|
import {
|
||||||
LoyaltyBlocksTypenameEnum,
|
LoyaltyBlocksTypenameEnum,
|
||||||
SidebarTypenameEnum,
|
SidebarTypenameEnum,
|
||||||
} from "@/types/requests/loyaltyPage"
|
} from "@/types/components/loyalty/enums"
|
||||||
|
import { Embeds } from "@/types/requests/embeds"
|
||||||
import { Edges } from "@/types/requests/utils/edges"
|
import { Edges } from "@/types/requests/utils/edges"
|
||||||
import { RTEDocument } from "@/types/rte/node"
|
import { RTEDocument } from "@/types/rte/node"
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
import { Typename } from "@/types/requests/utils/typename"
|
||||||
import type { JoinLoyaltyContact } from "@/server/routers/contentstack/loyaltyPage/output"
|
import type { JoinLoyaltyContact } from "@/server/routers/contentstack/loyaltyPage/output"
|
||||||
import type { Typename } from "./utils/typename"
|
|
||||||
|
|
||||||
export enum JoinLoyaltyContactTypenameEnum {
|
export enum JoinLoyaltyContactTypenameEnum {
|
||||||
LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact = "LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact",
|
LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact = "LoyaltyPageSidebarJoinLoyaltyContactBlockContactContact",
|
||||||
Reference in New Issue
Block a user